Hi,
I have a parent and child grid that are both using Ajax to when a selection is made on the parent grid to update the child grid. When I select an item on the parent grid, the CSS style for the .rgSelectedRow disappears and is the user has no way of knowing which one they selected although the child grid displays the correct data. I've narrowed it down to the RadGrid1_OnItemDataBound method where I programmatically apply CSS rules to the respective alternating items and regular items. The way I apply the CSS is as follows:
if (e.Item.ItemType == Telerik.Web.UI.GridItemType.AlternatingItem)
{
e.Item.CssClass = " AlternatingItemColor " + cssstyle + " rgAltRow";
}
else
{
e.Item.CssClass = "rgRow " + cssstyle;
}
Where cssstyle is the CSS rule based off attributes in the data item. When I remove this code from the method, the selected row persists through the postback, but that's where the problem lies. Any suggestions would be very helpful as to why it's being overridden.
Thanks,
Joe
I have a parent and child grid that are both using Ajax to when a selection is made on the parent grid to update the child grid. When I select an item on the parent grid, the CSS style for the .rgSelectedRow disappears and is the user has no way of knowing which one they selected although the child grid displays the correct data. I've narrowed it down to the RadGrid1_OnItemDataBound method where I programmatically apply CSS rules to the respective alternating items and regular items. The way I apply the CSS is as follows:
if (e.Item.ItemType == Telerik.Web.UI.GridItemType.AlternatingItem)
{
e.Item.CssClass = " AlternatingItemColor " + cssstyle + " rgAltRow";
}
else
{
e.Item.CssClass = "rgRow " + cssstyle;
}
Where cssstyle is the CSS rule based off attributes in the data item. When I remove this code from the method, the selected row persists through the postback, but that's where the problem lies. Any suggestions would be very helpful as to why it's being overridden.
Thanks,
Joe