Hii, Here a Very Easy way to find datakeyname value of Radgrid
int intItemIndex = e.Item.ItemIndex; ;
int intMyID = Convert.ToInt32(Radgrid.MasterTableView.Items[intItemIndex].GetDataKeyValue("Id").ToString());
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) |
{ |
if (e.CommandName == "some_command") |
{ |
GridEditFormItem editform = (GridEditFormItem)((Telerik.Web.UI.GridDataItem)(e.Item)).EditFormItem; |
TextBox txtbx = (TextBox)editform.FindControl("MyTextbox"); |
string strtxt = txtbx.Text; |
} |
} |