Click here to Skip to main content
16,011,447 members
Home / Discussions / C#
   

C#

 
QuestionLooking for component Pin
Jefis15-Jun-06 11:55
Jefis15-Jun-06 11:55 
QuestionCheckListBox and Which Forum Pin
Malcolm Smart15-Jun-06 11:27
Malcolm Smart15-Jun-06 11:27 
GeneralRe: CheckedListBox and Which Forum [modified] Pin
Mike Poz15-Jun-06 14:42
Mike Poz15-Jun-06 14:42 
GeneralRe: CheckedListBox and Which Forum Pin
Malcolm Smart15-Jun-06 21:09
Malcolm Smart15-Jun-06 21:09 
QuestionSo is there anyone who has been able to draw transparent on winforms? Pin
Ista15-Jun-06 11:09
Ista15-Jun-06 11:09 
AnswerRe: So is there anyone who has been able to draw transparent on winforms? Pin
Josh Smith15-Jun-06 11:18
Josh Smith15-Jun-06 11:18 
GeneralRe: So is there anyone who has been able to draw transparent on winforms? Pin
Ista15-Jun-06 15:50
Ista15-Jun-06 15:50 
QuestionDatabinding to the correct Row Pin
Drew McGhie15-Jun-06 11:02
Drew McGhie15-Jun-06 11:02 
I have a small form that I spawn from another that acts as a way to edit a row of data from a typed DataTable. Within the load() method of the form, I execute this code.

<br />
     mySource = new BindingSource();<br />
<br />
     mySource.DataSource = myManagerClient.VersionTable;<br />
<br />
     uxcbFMonth.DataBindings.Add("SelectedValue", mySource, "FiscalMonth");<br />
     uxtextFYear.DataBindings.Add("Text", mySource, "FiscalYear");<br />
     uxtextName.DataBindings.Add("Text", mySource, "VersionName");<br />
     uxcbType.DataBindings.Add("SelectedValue", mySource, "Type");<br />


That works just fine and the data is all bound correctly. The problem is that it defaults to the first row of data in the sorted bindingsource. I have a foreign key value for the datarow I want to display, and I know I need to use the BindingSource.Position property to properly set the position I want to edit, but I'm having problems correctly finding the value to pass.

I tried using mySource.IndexOf(/*The DataRow using myManagerClient.VersionTable.Select()*/), that returned -1.

I also tried to use mySource.Filter(), but that filters the data in the main form as well (since I'm using Form.Show() instead of Form.ShowDialog()), and visually, I think that will confuse the end-user.

As far as I can tell at the moment, I'm going to have to manually pass through each row until I find the right one, but there really seems like there might be an easy way that I'm just missing.

Any ideas?
AnswerRe: Databinding to the correct Row Pin
Drew McGhie15-Jun-06 11:31
Drew McGhie15-Jun-06 11:31 
QuestionFairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) [modified] Pin
ThisIsMyUserName215-Jun-06 10:45
ThisIsMyUserName215-Jun-06 10:45 
AnswerRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Josh Smith15-Jun-06 11:14
Josh Smith15-Jun-06 11:14 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 11:20
ThisIsMyUserName215-Jun-06 11:20 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Josh Smith15-Jun-06 11:43
Josh Smith15-Jun-06 11:43 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 12:30
ThisIsMyUserName215-Jun-06 12:30 
AnswerRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Alexander Wiseman15-Jun-06 11:24
Alexander Wiseman15-Jun-06 11:24 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Alexander Wiseman15-Jun-06 11:29
Alexander Wiseman15-Jun-06 11:29 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 12:12
ThisIsMyUserName215-Jun-06 12:12 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Alexander Wiseman15-Jun-06 12:22
Alexander Wiseman15-Jun-06 12:22 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 12:39
ThisIsMyUserName215-Jun-06 12:39 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
Alexander Wiseman15-Jun-06 12:47
Alexander Wiseman15-Jun-06 12:47 
GeneralRe: Fairly easy task (I think), but difficult to explain (plus I'm sort of a newbie) Pin
ThisIsMyUserName215-Jun-06 13:21
ThisIsMyUserName215-Jun-06 13:21 
QuestionUsing RPC (with IDL) from C# Pin
BambooMoon15-Jun-06 9:55
BambooMoon15-Jun-06 9:55 
QuestionDataGridView custom Column Pin
Mike0915-Jun-06 8:56
Mike0915-Jun-06 8:56 
Questiondatagrid and databinding (long due to code) Pin
leckey15-Jun-06 8:51
leckey15-Jun-06 8:51 
AnswerRe: datagrid and databinding (long due to code) Pin
Josh Smith15-Jun-06 9:18
Josh Smith15-Jun-06 9:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.