how to catch the row number
-
In my application i want to catch the row number of a gridview from the click event of a button,which is inside the cell of the gridview.Actually i want to know the row number of the button clicked.How can it be achieved?? Thanx in advance.
-
In my application i want to catch the row number of a gridview from the click event of a button,which is inside the cell of the gridview.Actually i want to know the row number of the button clicked.How can it be achieved?? Thanx in advance.
Quite a few ways. Add an attribute to your button and set its value as Container.DisplayIndex. Then you can access this attribute in the click event of the button to get the row index. You can also do the same using the naming container property.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
-
In my application i want to catch the row number of a gridview from the click event of a button,which is inside the cell of the gridview.Actually i want to know the row number of the button clicked.How can it be achieved?? Thanx in advance.