4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 16 Jul 2010, 07:13 AM
Hi Jessie,
You can easily achieve this by using the ColumnUniqueName.
C#:
-Shinu.
You can easily achieve this by using the ColumnUniqueName.
C#:
protected
void
Button1_Click(
object
sender, EventArgs e)
{
GridDataItem gridItem = (GridDataItem)RadGrid1.SelectedItems[0];
string
name = gridItem[
"CompanyName"
].Text; // Get the cell value
string
dataKey = gridItem.GetDataKeyValue(
"CustomerID"
).ToString(); // Get the datakeyvalue
}
-Shinu.
0
Hello Jessie,
In addition, you can use the GridDataItem object's ExtractValues() method passing to it a hash table. The latter will be populated will the key-value pairs for your columns:
Hope it helps.
Greetings,
Tsvetoslav
the Telerik team
In addition, you can use the GridDataItem object's ExtractValues() method passing to it a hash table. The latter will be populated will the key-value pairs for your columns:
protected
void
Button1_Click(
object
sender, EventArgs e)
{
GridDataItem gridItem = (GridDataItem)RadGrid1.SelectedItems[0];
Hashtable fieldValues = gridItem.ExtractValues(fieldValues);
.....
}
Hope it helps.
Greetings,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
JJ
Top achievements
Rank 1
answered on 16 Jul 2010, 03:42 PM
thanks !
0
JJ
Top achievements
Rank 1
answered on 16 Jul 2010, 03:42 PM
thabk you Tsvetoslav !