c# - Get RadGrid row value through a button column in the grid -
I have a button with a button in my redridge, I want to be able to click the button and get its values The row in which the button is located. This line should be done without choosing, I remember that my friend has seen a part of the code in which he used something similar to get the line from ". Parent" or button column.
When you click on any button in RadGrid's GridButtonColumn, you can press the button Row and line values can be accessed:
In the definition of GridButtonColumn, set its command name with something like CommandName = "Test".
.
Now add below to access whatever you want for your code-back. In my sample code given below, I get the value in the "whatever" column:
protected zero RadGrid1_ItemCommand (Object Sender, GridCommandEventArgs e) {if (e.CommandName == "Test") {GridDataItem Item = (GridDataItem) e.Item; String column whats wav = item ["whatever"]. Text; }}
Comments
Post a Comment