1
Reply

How to get grid view selected row's DataBase id

Ask a question
i have grid view, which is not auto generated columns. In grid view 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 grid view is filtered.
what I 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.
some one plz help with new idea or solution for what i am trying.. thanx in advance....

Answers (1)