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.
Unfortunately, activation email could not send to your email. Please try again.

VisibleCellsRange returns zero when all columns are locked

Thread ID:





28411 May 2,2005 06:00 AM May 3,2005 10:41 AM Windows Forms 6
Tags: GridControl
Asked On May 2, 2005 06:00 AM

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

Administrator [Syncfusion]
Replied On May 2, 2005 07: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.

Replied On May 2, 2005 11: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?

Administrator [Syncfusion]
Replied On May 2, 2005 12:10 PM

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?

Replied On May 3, 2005 04: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

Administrator [Syncfusion]
Replied On May 3, 2005 05: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.

Replied On May 3, 2005 10:41 AM

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


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.

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.