ADAdministrator Syncfusion Team May 2, 2005 06:22 AM
What do you mean by locked?
Do you mean frozen? or Enabled = false? or ??.
By design, the grid.ViewLayout.VisibleCellsrange does not in frozen cols or rows. If you want to know how many frozen rows/columns you would have to do the calculation yourself. You can use grid.Model.ColWidths.GetTotal(0, grid.Model.Cols.FrozenCount) to compute the width of the frozen columns, and you can compare this to grid.ClientSize.Width to see if all are visible or not.
PEPeterMay 2, 2005 10:34 AM
i mean locked cells..
basically what i want to ''know'' is how many rows are visible on the screen.
when all the columns visible are locked then the rows visible returned is zero which is not correct.
Or is there another way to find out what the visible range of rows are on the screen?
ADAdministrator Syncfusion Team May 2, 2005 11:10 AM
I do not know what "i mean locked cells.." means.
Can you post the code that you used to ''lock'' these cells so I can understand what you are doing?
PEPeterMay 3, 2005 03:26 AM
i mean FrozenCount...
so if all the columns that are visible on the grid are frozen ( but not all the columns ) then
the visible rows returns zero,
which as i say is wrong
ADAdministrator Syncfusion Team May 3, 2005 04:18 AM
By design, the grid.ViewLayout.VisibleCellsrange does not include frozen cols or rows. It only includes the scrollable protion of the grid. If you have our source code, you can see the actual calculation that excludes the frozen parts.
You can use this.gridDataBoundGrid1.TopRowIndex and this.gridDataBoundGrid1.ViewLayout.LastVisibleRow to provide the rows when the VisibleCellsRange.IsEmpty is true.
PEPeterMay 3, 2005 09:41 AM
but i think the logic is wrong as clearly one can still scroll vertically ...