4 Answers, 1 is accepted
0
Accepted
Hello Samantha,
You can use ItemDataBound where you have access to the item object in your collection via e.Item.DataItem.
Greetings,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can use ItemDataBound where you have access to the item object in your collection via e.Item.DataItem.
Greetings,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Samantha
Top achievements
Rank 1
answered on 03 Oct 2008, 11:14 AM
I usually do the following for a regular grid:
GridDataItem gridItem = e.Item as GridDataItem;
if (e.Item is GridDataItem)
{
foreach (GridColumn column in RadGrid1.MasterTableView.RenderColumns)
{
How do I access the detail columns?
0
Hello Samantha,
In ItemDataBound you can access both master and detail items.
Regards,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
In ItemDataBound you can access both master and detail items.
Regards,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Shinu
Top achievements
Rank 2
answered on 03 Oct 2008, 12:29 PM
Hi Samantha,
You can use the Name property to access the detail table in the ItemDataBound event.
CS:
Cheers
Shinu.
You can use the Name property to access the detail table in the ItemDataBound event.
CS:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
{ |
if (e.Item.OwnerTableView.Name == "Detail1") |
{ |
foreach (GridColumn col in RadGrid1.MasterTableView.DetailTables[0].RenderColumns) |
{ |
} |
} |
} |
Cheers
Shinu.