Gridview template column having imagebutton
-
hello ! I am using gridview to display records in my web application. I have defined two template column each having a asp imagebutton for delete row and update status respectively. for deleting row i am using grid rowdeleting event which is working fine but i am unable to get datakey column value on status imagebutton click. I also defined one bound column and on the basis of this boundcolumn and primary field column value i have to update status.I got stuck to this problem terribly. Anyone who knows please tell how on imagebutton click that particular row can be access.I want that particular row's primary key field(or datakey value as primary key column is assigned to this) and bound column value please send me the code or solution ASAP as its urgent. Any help will be highly appreaciated. Thanks in advance!!
-
hello ! I am using gridview to display records in my web application. I have defined two template column each having a asp imagebutton for delete row and update status respectively. for deleting row i am using grid rowdeleting event which is working fine but i am unable to get datakey column value on status imagebutton click. I also defined one bound column and on the basis of this boundcolumn and primary field column value i have to update status.I got stuck to this problem terribly. Anyone who knows please tell how on imagebutton click that particular row can be access.I want that particular row's primary key field(or datakey value as primary key column is assigned to this) and bound column value please send me the code or solution ASAP as its urgent. Any help will be highly appreaciated. Thanks in advance!!
d_smit wrote:
please send me the code or solution ASAP as its urgent.
Almost had me there until I saw this. Don't be rude and you might have gotten an answer. It may be urgent to you but not anyone else here.
only two letters away from being an asset
-
hello ! I am using gridview to display records in my web application. I have defined two template column each having a asp imagebutton for delete row and update status respectively. for deleting row i am using grid rowdeleting event which is working fine but i am unable to get datakey column value on status imagebutton click. I also defined one bound column and on the basis of this boundcolumn and primary field column value i have to update status.I got stuck to this problem terribly. Anyone who knows please tell how on imagebutton click that particular row can be access.I want that particular row's primary key field(or datakey value as primary key column is assigned to this) and bound column value please send me the code or solution ASAP as its urgent. Any help will be highly appreaciated. Thanks in advance!!
Well...the imagebutton is the sender ImageButton btn = (ImageButton)sender; the imagebutton is in the container of the row GridViewRow row = (GridViewRow)btn.NamingContainer; (you now can use the row.SelectedValue for your DataKey) The gridview row is in the container of the gridview GridView grd = (GridView)row.NamingContainer; ....use this answer quickly! cause it might be urgent! It is more polite not to tell in you question that it is urgent. Why you did not post your question when you did not run out of time!
In Word you can only store 2 bytes. That is why I use Writer.