asp.net - Find out if row /item in DataGrid is in edit mode -


in asp.net 3.5 have datagrid. has several rows of data. have radio buttons out of datagrid. data grid has column drop down list in edit mode. click 1 of radio buttons , postback. want know in check changed event radio button if of rows in datagrid in edit mode. how do that? can loop through datagrid this

for each item datagriditem in dgedittime.items         trace.warn("the item index is:" & item.itemindex)      next 

but how find out if row in edit mode?

if using gridview can editindex calling:

int editindex = yourgridview.editindex  

if using old datagrid control, can call edititemindex:

int editindex = yourdg.edititemindex 

if code doesn't work expect, rebinding data on every postback , hence, edititemindex (or editindex depending on actual control using) therefore reset original state.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -