This project is read-only.

Sample 50 Exception

Mar 18, 2010 at 9:09 AM

I am testing the sample 50 for showing /hiding columns/rows

If you try to set the row 1 as invisible ( by click on check-box) , an exception is throwed  !

Mar 18, 2010 at 1:20 PM

Ok, i've fixed this bug.


However, i found another one, and i can not fix that.


The bug occurs when "hide first 40" rows is ticked. Then the vertical scrollbar things for some reason that vertical page is very byg (+- 40 rows) and goes immediatelly out of range if you click several times on it

Mar 18, 2010 at 1:35 PM

Actually, the bug can also be reproduced in form sample 57 and 50.


Just observe how vertical scrollbar behaves when doing large changes, not small

Mar 18, 2010 at 2:42 PM

Thanks for fix  :)

for the second bug , i will take a look if i can do something , strange behavior for the scrollbar !!

Mar 19, 2010 at 9:46 AM

Actually, I also tried to fix the second bug, but i found very strange behaviour.


At first it seemed that property scrollBar.LargeChange   was being set very high. And i found that indeed it was set too high. That was because the function which calculated it's value was also including hidden cells. So if 40 rows are hidden, large change was set instead of 10, it was set to something like 50.

However, i fixed that. Now large change is set to normal (+- 10), but still it looks like it being set very high, but i can not find where. The only place is in CustomScrollControl.cs:362


So now i am stuck because i can not find who actually sets LargeChange to very high value

Mar 19, 2010 at 11:43 AM
Edited Mar 19, 2010 at 11:45 AM

like what you say , i search around scrollBar.LargeChange , this value is setted by VerticalPage property

this property initialised and defined by function LoadScrollArea  which is called in GridVirtual in the function SetScrollArea

I think the bug is here where the calcul of the vertpage

int vertPage = Math.Max(GetVisibleRows(false).Count - ActualFixedRows, 1);

may be.



Mar 20, 2010 at 10:29 AM

Yes, i thought the same.


However, i fixed the bug with GetVisibleRows function. See this changeset:

I added simple If checking to ensure that all rows are visible. However, that did not solve problem.  Please update the copy and try again, maybe i just make some simple stupid mistake

Mar 24, 2010 at 10:28 AM
Thanks for update , no more exception throwed :) for the second bug , i will try to see similar case of using the scrollbar behaviour in other project , may be i get an idea to fix this
Mar 31, 2010 at 11:46 AM

I have found the problem


This code :  :  was incorrectly modifying large scrolling.  I simply removed this code, and now everythings looks fine :)

Mar 31, 2010 at 1:02 PM

Greatefull , good work :)