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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl''s and GridDataBoundControl''s GridModel property differences

Thread ID:





53326 Dec 12,2006 10:43 AM UTC Dec 14,2006 09:12 AM UTC WinForms 3
Tags: GridControl
Asked On December 12, 2006 10:43 AM UTC


For example, if mentioned two controls contain 10 rows (including header row), GridControl.Model.RowCount returns 10, but GridDataBoundControl.Model.RowCount returns 9.

Please advice!


Administrator [Syncfusion]
Replied On December 13, 2006 08:24 AM UTC

Hi Edijs,
Could you please show me the difference in this sample?

Replied On December 13, 2006 01:49 PM UTC

Hi Jeba,

Problem is that Model.RowCount returns number of rows excluding Header column.
BUT when you want to get last record of GridDataBoundControl like X.Model[X.Model.RowCount - 1] you will not get the last, but last - 1 record.

In other words problem is that Model indexer is taking into account Header row. In that case shouldn't it return Actual record count + Header row as Mmodel.RowCount ?


Administrator [Syncfusion]
Replied On December 14, 2006 09:12 AM UTC

Hi Edijs ,

The gridDataBound.Model.RowCount will include the AddNew row if you have one so it might be 1 more than the number of rows in the DataTable. The AddNew row does not have a record associated with it until it is actually added.

Please refer to the following forum thread for more details.
RowCount : http://www.syncfusion.com/support/forums/message.aspx?&MessageID=15489
Grid Last Row: http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=28914

Best Regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon