We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Empty lines in a GDBG

Hi
Is there any way I can design a GDBG with a fixed number of rows in advance even if I dont have any data.? For example I want the grid to always have at least 10 rows even if I do not have 10 rows of data in my DataSet.
thanks.

3 Replies

AD Administrator Syncfusion Team February 14, 2007 05:54 PM UTC

Hi Ryan,

One way you can do this by handling the Model.QueryRowCount event of the grid and set the e.RowIndex to new row index. Here is a code snippet.

this.gridDataBoundGrid1.Model.QueryRowCount +=new GridRowColCountEventHandler(Model_QueryRowCount);

private void Model_QueryRowCount(object sender, GridRowColCountEventArgs e)
{
if( e.Count < 10 )
{
e.Count = 10;
e.Handled = true;
}
}

Best regards,
Haneef


AD Administrator Syncfusion Team February 15, 2007 02:05 PM UTC

Hi Haneef
Thanks. and what about a DataGroupingGrid ?
is there a more elegant way for that without code i.e in the designer.
thanks.


>Hi Ryan,

One way you can do this by handling the Model.QueryRowCount event of the grid and set the e.RowIndex to new row index. Here is a code snippet.

this.gridDataBoundGrid1.Model.QueryRowCount +=new GridRowColCountEventHandler(Model_QueryRowCount);

private void Model_QueryRowCount(object sender, GridRowColCountEventArgs e)
{
if( e.Count < 10 )
{
e.Count = 10;
e.Handled = true;
}
}

Best regards,
Haneef


AD Administrator Syncfusion Team February 15, 2007 11:50 PM UTC

Hi,

The grouping grid currently has no support for this. Sorry for the inconvenience, but there is no easy way to get this working.

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon