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...
Music Rocks
www.musicreserve.blogspot.comSuccess is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.