Hi,
If you have a radgrid with a button column that fires a command when pressed like so:
<telerik:GridButtonColumn UniqueName="btnCol" HeaderText="Script" CommandName="BtnPressed" Text="Show">
</telerik:GridButtonColumn>
Then in the c# event function for the radgrid:
protected void RadGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "BtnPressed")
{
if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
string cellVal = Convert.ToString(item["cellOne"].Text);
Everything works fine, if you click on row 0, cellVal will equal the value of [row 1, cell 1], if you click row 3, cellVal will equal the value of [row 3, cell 1], etc.
Adding this to the radgrid:
<ClientSettings>
<ClientEvents OnCommand="OnCommand" />
</ClientSettings>
And then this javascript:
function OnCommand(sender, args) {
// Empty function
}
This will completely break the rad grid button column. Now if you click a button on any row in the grid, you will always receive data from the first row in the RadGrid_ItemCommand function. E.g if you click on the button in row 6 you will receive the data from [row 1, cell 1].