how can I reach to values(text) of to column in gridview with pressing the button of that row?
-
Hi I have a gridview with several column.in itemtemplate of this gridview i put a button.one of column is product_id and one of them is a textbox that user input something in it. when user click on button in a row ,how can i get the product_id text and text of that textbox of that row.because i want to remove these values from a list.(I want to get text of that cell) in which event? please help me .thanks
-
Hi I have a gridview with several column.in itemtemplate of this gridview i put a button.one of column is product_id and one of them is a textbox that user input something in it. when user click on button in a row ,how can i get the product_id text and text of that textbox of that row.because i want to remove these values from a list.(I want to get text of that cell) in which event? please help me .thanks
hi, first u have to find the child control from the grid like this foreach (GridViewRow gv in .Rows) { //fetch the prodid TextBox txtprodid = (TextBox)gv.findcontrol("mention the product id"); string prodid = txtprodid.Text; //fetch textbox value TextBox txt = (TextBox)gv.findcontrol("mention the tetxbox id"); string txtid = txt.Text; }
T.Balaji