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

GridGroupingControl (2.1.0.9) - Column Width

Hi! In my form_load method I try to set width for a column by doning following: this.topLevelDescriptor.Columns["acolumn"].Widht = 75; But when I set the width the scroll bar of the GridGroupingControl disappears! How can I solve that problem? Can anybody help me? Kind regards, Dan Roesch

4 Replies

AD Administrator Syncfusion Team September 1, 2005 12:32 PM UTC

I tried to see this problem in a simple sample (using both a flat datasource and a hierarchical datasource), and could not. Here is the flat sample. http://www.syncfusion.com/Support/user/uploads/GGC2109_7ee11e6d.zip What are you doing differently? Can you upload a sample showing the problem?


DR Daniel Roesch September 1, 2005 12:43 PM UTC

Hi Clay I wasn''t very exact with my explanation because not the vertical but the horizontal scrollbar disappears also your example does not work correctly. As soon as you add more columns to the grid the h-scrollbar gots lost. Cheers! Dan Roesch


DR Daniel Roesch September 1, 2005 12:43 PM UTC

>Hi Clay > >I wasn''t very exact with my explanation because not the vertical but the horizontal scrollbar disappears also your example does not work correctly. As soon as you add more columns to the grid the h-scrollbar gots lost. > >Cheers! >Dan Roesch PS: I do the same as you did in your example


AD Administrator Syncfusion Team September 1, 2005 01:07 PM UTC

This has been corrected in later releases. The only work-around I know is to let the grid initially draw, and then set the colwidth. This does cause a flash as the grid displays.
	//bottom of formload
	Timer t = new Timer();
	t.Interval = 10;
	t.Tick += new EventHandler(t_Tick);
	t.Start();
}

private void t_Tick(object sender, EventArgs e)
{
	Timer t = sender as Timer;
	t.Stop();
	t.Tick -= new EventHandler(t_Tick);
	t.Dispose();
	this.gridGroupingControl1.TableDescriptor.Columns["Col2"].Width = 175;
}

            

Loader.
Live Chat Icon For mobile
Up arrow icon