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

Set Maximum retrieved rows in DataBoundGrid

Hi,
how can i limit the number of rows displayed in a griddataboundgrid.

Thanks

1 Reply

AD Administrator Syncfusion Team September 19, 2006 04:19 AM UTC

Hi Simon,

Issue 1: Hide the rows in a Grid..

A row or a column can be hidden or unhidden by just setting the this.grid.Model.Rows.Hidden[rowIndex] =true; this.grid.Model.Cols.Hidden[colIndex] = true;
and this.grid.Model.Rows.Hidden[rowIndex] =false; this.grid.Model.Cols.Hidden[colIndex] = false; respectively. Below is a code snippet

//For hide Single single(17 th) row
this.grid.Model.Rows.Hidden[17] = true; //True for hide a row

//For show Single single(20 th) row
this.grid.Model.Rows.Hidden[20] = false; //False for show a row

//For hide or show the multiple rows.
this.grid.Model.Rows.Hidden.SetRange(fromIndex,lastRowIndex,true);

//To display the Firs 10 rows...in a grid
this.grid.Model.HideRows.SetRange(10,this.grid.Model.RowCount,true);

See the Sample: http://www.syncfusion.com/Support/user/uploads/DataBoundCellValue_159421ba.zip

Issue 2: Record Navigation DataBound.

The Record Navigation DataBound ( \Syncfusion\Essential Studio\4.3.0.25\windows\Grid.Windows\Samples\DataBound\RecordNavDataBoundGrid ) sample displays a GridDataBoundGrid within a GridRecordNavigationControl. This combination will give you a look that is very similar to what you would see in Microsoft Access. This sample was created mainly using the designer. First an SqlDataAdapter was created and connected to the Customers table of the NorthWind database. Then a DataSet was generated. Next, a GridRecordNavigationControl was dropped on the form and finally a GridDataBoundGrid was dropped on the GridRecordNavigationControl. All this has been done from the designer. The only code added, was in the Form_Load to fill the dataset.

Let me know if you are looking something different.

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon