how to identify the button was clicked...
-
hi, i added button into gridview at designtime in first column. after running the application if gridview get populated with data. suppose it contain 4 rows. if user click on button of 2nd row,i want show the message that you clicked 2nd row. i.e. according to clicking of button i want to show the message of which row was clicked. but how can i identify which button was clicked.... please, help me....
-
hi, i added button into gridview at designtime in first column. after running the application if gridview get populated with data. suppose it contain 4 rows. if user click on button of 2nd row,i want show the message that you clicked 2nd row. i.e. according to clicking of button i want to show the message of which row was clicked. but how can i identify which button was clicked.... please, help me....
In the OnRowCreated event, assign the javascript click event and send the row index to it. That index you can then access in the server side click event through a hidden field.
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
-
hi, i added button into gridview at designtime in first column. after running the application if gridview get populated with data. suppose it contain 4 rows. if user click on button of 2nd row,i want show the message that you clicked 2nd row. i.e. according to clicking of button i want to show the message of which row was clicked. but how can i identify which button was clicked.... please, help me....
-
In the OnRowCreated event, assign the javascript click event and send the row index to it. That index you can then access in the server side click event through a hidden field.
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
Use a button column and you don't need to do any of this.
I know the language. I've read a book. - _Madmatt
-
hi, i added button into gridview at designtime in first column. after running the application if gridview get populated with data. suppose it contain 4 rows. if user click on button of 2nd row,i want show the message that you clicked 2nd row. i.e. according to clicking of button i want to show the message of which row was clicked. but how can i identify which button was clicked.... please, help me....
Use a button column or template column and specify the onclick even handler for client-side processing or handle the event on the server-side
I know the language. I've read a book. - _Madmatt
-
Use a button column or template column and specify the onclick even handler for client-side processing or handle the event on the server-side
I know the language. I've read a book. - _Madmatt
ya i used template column for the button and assign the event handler. and when i clicked on button it goes to that event. but i want to know the row index of that row where the button is located(which get clicked) can you provid me code ..... actualy, i am showing the booking status in that gridview,first the status is 'in process' after clicking on button which is in gridview, it should the modal popup,in modal popup after clicking on 'ok' button, the status of booking should replaced with 'cancel req.' and for this purpose i want to know the row index of that gridview... so please, help me...
modified on Thursday, February 11, 2010 12:34 AM
-
ya i used template column for the button and assign the event handler. and when i clicked on button it goes to that event. but i want to know the row index of that row where the button is located(which get clicked) can you provid me code ..... actualy, i am showing the booking status in that gridview,first the status is 'in process' after clicking on button which is in gridview, it should the modal popup,in modal popup after clicking on 'ok' button, the status of booking should replaced with 'cancel req.' and for this purpose i want to know the row index of that gridview... so please, help me...
modified on Thursday, February 11, 2010 12:34 AM
thanks to all of you by helping me i the problem get solved by me... i get the rowindex of the button by rowIndex of button's parent's parent this is written at the event which is assigned to the button at design time in template column... i.e. Protected Sub btnCancelClick(ByVal sender As Object, ByVal e As System.EventArgs) Dim intRowIndex as Integer=sender.Parent.Parent.RowIndex End Sub :) BUT THANKSSSS To all of You....!