Hi Carl,
My sincere apologies for this delay in responding.
The reason is that you are setting the Style.CellValue for the AddNewRecord cell in a QueryCellStyleInfo event. Instead of setting the CellValue of the AddNewRecordCell, try hanlding the TableControlDrawCell event to draw the AddNewRecordCell manually. Below are the code snippet to show this task.
void gridGroupingControl1_TableControlDrawCell(object sender, GridTableControlDrawCellEventArgs e)
{
GridTableCellStyleInfo styleInfo = (GridTableCellStyleInfo)e.Inner.Style;
if (styleInfo.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.AddNewRecord
&& e.Inner.ColIndex > 0 )
{
e.Inner.Renderer.Draw(e.Inner.Graphics, e.Inner.Bounds, e.Inner.RowIndex, e.Inner.ColIndex, e.Inner.Style);
e.Inner.Graphics.DrawString("Click Here to add a new record", new Font("Arial", 10f), Brushes.Blue, e.Inner.Bounds);
e.Inner.Cancel = true;
}
}
Please refer to the attached sample for modification and let me know if this helps.
ModifiedGGC_AddNewRec1.zipMany thanks for your patience.
Best regards,
Haneef