View Image attached
In the ItemDataBount I do stuff to customize the GridGroupHeaderItem wich works fine.
When I click on the grid and come back to it, the formatting is lost (right side of the Image attached)
I use the RadAjaxManager and the grid is updated on the event but is not rebinded.
Is there a way not to loose this without rebinding.
here the code if it help
protected void rdgMeals_ItemDataBound(object source, GridItemEventArgs e)
{
if (e.Item != null)
{
if (e.Item.ItemType == GridItemType.GroupHeader)
{
GridGroupHeaderItem xGridGroupHeaderItem = (GridGroupHeaderItem)e.Item;
HtmlAnchor xHtmlAnchor = new HtmlAnchor();
String xDate = ((DateTime)DataBinder.Eval(xGridGroupHeaderItem.DataItem, "Date")).ToString("yyyy-MM-dd");
xHtmlAnchor.InnerHtml = "<img alt='Statistics' src='/Images/Statistics.png' height='12' width='12' style='border: none;' /> " + xDate;
xHtmlAnchor.HRef = "javascript:void(0);";
xHtmlAnchor.Attributes.Add("onclick", "OpenFoodStatisticsMeals('0', '" + this.CurrentUserId + "', '" + xDate + "', '" + xDate + "');");
xHtmlAnchor.Style.Add("color", "#000000");
xHtmlAnchor.Style.Add("border", "none");
xHtmlAnchor.Style.Add("text-decoration", "none");
xGridGroupHeaderItem.DataCell.Controls.Add(xHtmlAnchor);
}
}
}
Thanks