This is a migrated thread and some comments may be shown as answers.

[Solved] value of row data inside the item-template

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 14 Mar 2013, 12:39 PM
Hi,
I have given the row data inside the item-template as given below
<%
Databinder.Eval(Container."empId")

How can I get its value in code behind

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Mar 2013, 12:42 PM
Hi,

Please try the following code snippet to access the data.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
  if (e.Item is GridDataItem)
  {
     GridDataItem item = (GridDataItem)e.Item;
     string s = ((DataRowView)e.Item.DataItem)["empId"].ToString();
  }
}

Thanks,
Shinu.
Tags
Grid
Asked by
Allen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or