Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

datagrid row change

Status
Not open for further replies.

tek1ket

MIS
Jan 25, 2009
70
IR
i have datagrid which its datasource should be set when it is doubleclicked. so how can i get the row change on it?
as i searched i should use the CurrencyManager, so should i put this line in form load??

myCurrencyManager = (CurrencyManager)dgridRealy.BindingContext[dvRelay, "RelayName"];
which dvRelay is dataview and contains nothing when the form loads?

if it is this right, i'll get this error
No value at index -1.
 
as i read, CurrencyManager is related to changes in moving in datasource ( forexample datatable of dataview).
so i cann't use CurrencyManager, because i want to change the value in a listbox when i move on the datagrid, forexample when the row selector(the left most part of the datagrid) changes form row one goes to row 2.nothing changes in datasource but just a the current row will differ.

any idea is appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top