I have gridview bound to datatable. There are 2 columns: ID and NAME.
When I click Edit button ID field is read only and NAME is textbox that I can edit.
Then on OnRowEditing Event I would like to have code like this:
datatable.Rows(0).Item("NAME")= gridview.rows.(e.rowindex).cells(1).text
but this doesn’t work.
1. How to catch new NAME value from the editing text box ?
2. Is it possible to access gridview field by name, not by index (in VB 6 I would wrote datagrid.Columns("NAME").value). How to do this in vb.net 2.0?
Thanks in advance
When I click Edit button ID field is read only and NAME is textbox that I can edit.
Then on OnRowEditing Event I would like to have code like this:
datatable.Rows(0).Item("NAME")= gridview.rows.(e.rowindex).cells(1).text
but this doesn’t work.
1. How to catch new NAME value from the editing text box ?
2. Is it possible to access gridview field by name, not by index (in VB 6 I would wrote datagrid.Columns("NAME").value). How to do this in vb.net 2.0?
Thanks in advance