Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSet, DataTable, DataView
Message
From
03/08/2004 09:47:57
 
 
To
03/08/2004 01:24:32
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00928619
Message ID:
00930327
Views:
21
Mike,

Glad you got it figured out. This looks fine. =)

>>By the way, Is this the best approach on how to deal with this kind of scenarios?

If my modal form could be used for editing more than one row, I would do this in a similar fashion to the way that you did. However, if it were only to be used for editing one row, I would have passed just the row to the form and not bothered messing around with the BindingContext.

~~Bonnie



>Hi Bonnie,
>
>Thanks for the reply. I just want to inform you that we solved my problem :D Thanks....
>
>Here is what I did.
>
>First I passed my Dataview and the CurrentRowIndex of my DataGrid from my MainForm.
>
>Then, I initialized the variables that will receive the Dataview and CurrentRowIndex in my modal Form
>
>Next, I created an instance of the BindingManagerBase of my ModalForm and used the received Dataview as its source.
>
>Then I just assign the Received CurrentRowIndex value to the position of the BindingManager just like this
>
>private DataView dvStaff;
>private int rindex;
>
>public FrmEditStaff(DataView dv, int ri)
>{
> InitializeComponent();
> this.dvStaff = dv;
>
> BindingManagerBase bmStaff = this.BindingContext[dvStaff] ;
> bmStaff.Position = ri;
>}
>
>Now my modal form displays the record that I want to modify.
>
>Thanks...
>
>By the way, Is this the best approach on how to deal with this kind of scenarios?
>
>Please Advice...
>Thanks...
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform