The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
For example, if mentioned two controls contain 10 rows (including header row), GridControl.Model.RowCount returns 10, but GridDataBoundControl.Model.RowCount returns 9.
ADAdministrator Syncfusion Team December 13, 2006 08:24 AM UTC
Hi Edijs, Could you please show me the difference in this sample? GC_GDBG_GridModel.zip Thanks, Jeba.
EDEdijsDecember 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 ?
Thanks, Edijs
ADAdministrator Syncfusion Team 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.