I am having two radgrids where I will show master data in one grid and when selecting the corresponding row I will show the data in child radgrid. As per the attached Image I would like to achieve my scenario can some one help me
3 Answers, 1 is accepted
0
Hello Dorababu,
I have created a sample RadGrid web site where I implemented the requested functionality. Please check out the attached application and let me know in case you need further assistance.
Regards,
Eyup
the Telerik team
I have created a sample RadGrid web site where I implemented the requested functionality. Please check out the attached application and let me know in case you need further assistance.
Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Dorababu
Top achievements
Rank 1
answered on 09 Jul 2012, 07:52 AM
Hi I would like to achieve this using server side functionality
0
Hello Dorababu,
I am not familiar with your specific scenario and the way your grids are related, however, you could get the row being edited on ItemCommand server event and highlight the corresponding parent item in the main grid:
I hope this will prove helpful.
All the best,
Eyup
the Telerik team
I am not familiar with your specific scenario and the way your grids are related, however, you could get the row being edited on ItemCommand server event and highlight the corresponding parent item in the main grid:
protected
void
RadGrid2_ItemCommand(
object
sender, GridCommandEventArgs e)
{
if
(e.CommandName == RadGrid.EditCommandName)
{
string
relationFieldKey = (e.Item
as
GridDataItem)[
"CustomerID"
].Text;
foreach
(GridDataItem dataItem
in
RadGrid1.MasterTableView.Items)
{
if
(dataItem[
"CustomerID"
].Text == relationFieldKey)
{
dataItem.BackColor = System.Drawing.Color.Lime;
// or dataItem.Selected=true;
Session[
"itemIndex"
] = dataItem.ItemIndex;
break
;
}
}
}
else
if
(e.CommandName == RadGrid.CancelCommandName || e.CommandName == RadGrid.UpdateCommandName
|| e.CommandName == RadGrid.PerformInsertCommandName)
{
RadGrid1.MasterTableView.Items[(
int
)Session[
"itemIndex"
]].BackColor =
new
System.Drawing.Color();
// or RadGrid1.MasterTableView.Items[(int)Session["itemIndex"]].Selected=false;
}
}
I hope this will prove helpful.
All the best,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.