Issue: want to differentiate from one row to another with slight color.
on a different way: |
|
|
|
|
|
|
|
|
protected void RadGrid1_PreRender(object sender, EventArgs e) | { | foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items) | { | if (dataItem.Expanded) | { | GridNestedViewItem nestedItem = dataItem.ChildItem; | Panel panel = (Panel)nestedItem.FindControl("PanelID"); | if (dataItem.ItemType == GridItemType.AlternatingItem) | { | panel.BackColor = System.Drawing.Color.Gray; | } | if (dataItem.ItemType == GridItemType.Item) | { | panel.BackColor = System.Drawing.Color.White; | } | } | } |
|
|
|
|
|
|
|
|
|
|
|
on the server side:protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
var radAjaxManager = RadAjaxManager.GetCurrent(Page);
radAjaxManager.ClientEvents.OnResponseEnd = "gridRowColor";
}
No comments:
Post a Comment