DisplayEmptyColumns

How do I display empty columns and empty rows in grouping grid, similar to regular grid (myGrid.TableModel.Options.DisplayEmptyColumns).
When I try to use this property in grouping grid, the grid freezes.

1 Reply

AD Administrator Syncfusion Team March 22, 2007 08:04 PM UTC

Hi MG,

Sorry for the delay in getting back to you. One way you can do this by using the custom engine and derive the GridTableControl, overriding OnPaint() and draw the required gridlines to get an empty lines stay on the GGC. Please refer this and let me know this helps.

protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);

if(isApproved)
{
Rectangle rect = this.RangeInfoToRectangle(GridRangeInfo.Table());

ControlPaint.DrawGrid(e.Graphics,e.ClipRectangle,new Size(this.GroupingControl.TableOptions.DefaultColumnWidth,2),Color.Red);
ControlPaint.DrawGrid(e.Graphics,e.ClipRectangle,new Size(2,this.GroupingControl.TableOptions.RecordRowHeight),Color.Red);

PaintEventArgs psrg = new PaintEventArgs(e.Graphics,rect);
base.OnPaint(psrg);
}

}

Best regards,
Haneef

Loader.
Up arrow icon