I have GridView, which is not auto generating columns. In GridView there are 3 columns: one for Checkbox(to delete selected row from DataTable),
one for edit link button(to edit current row),
and the third one is for showing data from DataTable.
I am binding it from DataTable.
I have a primary key in DataTable.
Now my problem is when I am clicking on edit link button I am not getting primary key(id) from
datatable for selected row in grid view (i think row is not selected when i am clicking on edit link button). I cant take row index to match it with datatable primary key as data bound in GridView is filtered.
What I have tried is, I created one more column in grid view as hidden which is primary key column from DataTable. But for that too I am not getting data in hidden column of row which is clicked for edit.
Someone please help with a new idea, or solution for what i am trying.. thanx in advance.
Plese try as follow.. for update, selected ID can be got in gv_RowCommand event. For delection [multiple select checbox] check in btnDelete_Click,
enter code here————–aspx code——————————–
—————code behind—————————