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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

VisibleCellsRange returns zero when all columns are locked

Thread ID:

Created:

Updated:

Platform:

Replies:

28411 May 2,2005 10:00 AM UTC May 3,2005 02:41 PM UTC WinForms 6
loading
Tags: GridControl
Peter
Asked On May 2, 2005 10:00 AM UTC

Hi, When all the columns that are visible on the screen are locked then VisibleCellsRange returns zero rows. We are using 2.0.5.1. Is there a way to get it to work correctly? cheers pete

Administrator [Syncfusion]
Replied On 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.

Peter
Replied On 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?

Administrator [Syncfusion]
Replied On 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?

Peter
Replied On 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

Administrator [Syncfusion]
Replied On 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.

Peter
Replied On May 3, 2005 02:41 PM UTC

ok... but i think the logic is wrong as clearly one can still scroll vertically ...

CONFIRMATION

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.

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

;