AD
Administrator
Syncfusion Team
May 2, 2005 11:22 AM UTC
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.
PE
Peter
May 2, 2005 03:34 PM UTC
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?
AD
Administrator
Syncfusion Team
May 2, 2005 04:10 PM UTC
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?
PE
Peter
May 3, 2005 08:26 AM UTC
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
AD
Administrator
Syncfusion Team
May 3, 2005 09:18 AM UTC
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.
PE
Peter
May 3, 2005 02:41 PM UTC
ok...
but i think the logic is wrong as clearly one can still scroll vertically ...