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. Image for the cookie policy date

Altering VisibleColumns does not reset Horizontal Scroll Bar Correctly

in the GridGroupingControl (2.5x): If I set the VisibleColumns the horizontal scroll bar does not reset. So, scrolling all the way to the right, there are still columns to the right. I can get to these columns by using the right-arrow on the keyboard to move right of the last showing column, which does force the grid to scroll. Here''s a snippet: tableDescriptor.VisibleColumns.Clear(); foreach (string colName in visibleCheckedColumns) { if (tableDescriptor.Columns.IndexOf(colName) != -1) { tableDescriptor.VisibleColumns.Add(colName); } }

17 Replies

AD Administrator Syncfusion Team August 3, 2005 05:42 PM UTC

You might try code like: this.gridGroupingControl1.Table.TableDirty = true; this.gridGroupingControl1.Refresh(); to see if that will handle this. There have been many changes to the GridGroupingingCOntrol since 2.5 that might affect this. Here is a little sample I where I tried to see this problem using It seems to behave as expected. Can you modify it to show the problem? http://www.syncfusion.com/Support/user/uploads/GGC2051_69453ace.zip

ER Eric Robishaw August 4, 2005 10:19 PM UTC

I''ve modified your example to reproduce the problem. Just run it and w/o even clicking either of the buttons, you''ll see the horizontal scrollbar is wrong. GridTableDescriptor_5898.zip

ER Eric Robishaw August 4, 2005 10:21 PM UTC

Discovered problem occurs when you alter the headertext of the Descriptor columns!

AD Administrator Syncfusion Team August 4, 2005 11:08 PM UTC

I may be missing something, but here is theh screen I see when I run the sample. The scrollbar appears OK to me and seems to scroll OK. http://www.syncfusion.com/Support/user/uploads/pic_d11fed1e.zip Are you seeing something different, or am I missing something?

ER Eric Robishaw August 5, 2005 01:48 PM UTC

Hes, the Horizontal scrollbar is not showing a scroll region. See my screenshot. screenShot_8054.zip

AD Administrator Syncfusion Team August 5, 2005 02:30 PM UTC

Exactly what 2.x version are you using? I do not recall any 2.5.x public releases. The picture I uploaded is with with using .NET 1.1 and WinXP. Have you considered upgrading?

ER Eric Robishaw August 5, 2005 02:55 PM UTC


ER Eric Robishaw August 5, 2005 02:59 PM UTC

Also, DotNet Framework 1.1 (1.1.4322, rev. 2032) and XP Pro, SP2 (Build 2600.050301-1519)

AD Administrator Syncfusion Team August 5, 2005 03:39 PM UTC

I am using the same OS and library version. And you get your picture running the exact sample you uploaded above, correct? Your grid comes up already scrolled. Mine comes up not scrolled. Mine shows themed headers, but yours does not. I am sort of at a loss here. If we could see the problem we may be able to suggest a work-around for, but without seeing I am not sure.

ER Eric Robishaw August 5, 2005 07:04 PM UTC

Great. What do you suggest? I''ve run on 3 different boxes, with differing results. My box (development) fails, the other two work. Any suggestions?

ER Eric Robishaw August 5, 2005 07:09 PM UTC

BTW, on my box it doesn''t show themed scroll bars, but on the working boxes it does. BUT...other windows (like Explorer, etc..., including the window I''m typing this message from) do show themed scroll bars. Just thought that might give a hint.

AD Administrator Syncfusion Team August 5, 2005 10:35 PM UTC

Have you tried turning off the themes on your system to see if that makes it work? this.gridControl1.ThemesEnabled = false; You could install the 3.x code base and try that. I will ask around here at Syncfusion to see if anyone else has any suggestions.

ER Eric Robishaw August 6, 2005 06:22 AM UTC

Yes. No effect. Also, setting: gridGroupingControl1.ShowNavigationBar = true; BEFORE populating and then to False AFTER populating causes the Horizontal Scroll bar to completely disappear altogether. Even tried UnDocking the grid, which has no effect. Is there any private / protect method that I can invoke through reflection that might force a resize of the H Scrollbar for now? We''re right in the middle of a mission critical project, and moving to 3.0 isn''t feasable right now. While customizing visibleColumns of the grid isn''t a show stopper, if I can use a reflection invoke of some hidden method to get us around the problem for now, I can make it work. As far as 3.0 is concerned: Can I load 3.0 demo on the same box w/ >Have you tried turning off the themes on your system to see if that makes it work? > >this.gridControl1.ThemesEnabled = false; > > >You could install the 3.x code base and try that. > >I will ask around here at Syncfusion to see if anyone else has any suggestions. > > > >

AD Administrator Syncfusion Team August 6, 2005 10:46 AM UTC

>>As far as 3.0 is concerned: Can I load 3.0 demo on the same box w/ Yes. But you would probably want to keep both 2.0 versions of your project and 3.2 versions of your project in separate folders though as the assmbly names have changed in teh 3.0 requiring you to use different referneces in that project. But the different names also make it much simpler for 2051 and 3210 to exist side by side. Since things work in that sample on two of your other systems, I think there is a chance that there is something specific on the non-working system that is causing this problem. If it is a glitch in the particular Framework installation, OS installation, or Syncfusion installation, then re-installing stuff might resolve it. But this would be a monumental undertaking with no reall assurance that it would resolve the problem. Here is something else to try in that sample. Take the all the code in the Form.Load handler and move it to the first button handler, commenting out the code that was there. Then run the project and see if the grid comes up ok if you populate from the button handler. If it does, then you can move the code back to Form.load, and at the bottom of form.Load add a timer that triggers a refresh of the grid after a slight pause. At the bottom of FormLoad, add timer, and put code in the tick event. //bottom of form.Load Timer t = new Timer(); t.Interval = 40; t.Tick += new EventHandler(t_Tick); t.Start(); //the handler private void t_Tick(object sender, EventArgs e) { Timer t = sender as Timer; t.Stop(); t.Dispose(); //just acces teh columns object. int count = gridGroupingControl1.TableDescriptor.Columns.Count; gridGroupingControl1.Table.TableDirty = true; gridGroupingControl1.Refresh(); }

ER Eric Robishaw August 8, 2005 05:11 PM UTC

No such luck moving event to button handler. Also... while this simple test DOES work on 2 other machines, the full project that the sample was attempting to mimick DOES NOT. i.e., I get the horizontal scroll behavior on all machines. I haven''t taken the time to narrow down what''s difference, since I could duplicate it with minimal effort on my box. Anyhow, I''m going to try 3.0 to see if that solves the problem.

ER Eric Robishaw August 9, 2005 06:05 PM UTC

Version Does the same thing!!!!! There''s got to be something I can explore here. Are there any new exposed methods in 3.2 that would allow me to force the grid to recalc the h-scroll bar? HELP! Eric

ER Eric Robishaw August 9, 2005 06:42 PM UTC

Update: Adding an Application.DoEvents() between filling the grid and altering the Header Columns fixes the problem w/

Live Chat Icon For mobile
Up arrow icon