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

UpdateColumnWidths exception

Thread ID:

Created:

Updated:

Platform:

Replies:

29138 May 17,2005 08:43 PM UTC May 18,2005 01:18 AM UTC WinForms 1
loading
Tags: Grouping
Heath Brand
Asked On May 17, 2005 08:43 PM UTC

Hello, I''m getting the exception (pasted below) when I remove my GridGroupingControl from the Controls collection (this.Controls.Remove()) of my UserControl. The only way I can avoid this error is to set AllowCalculateMaxColumnWidth to false before removing the GroupingGrid from the controls collection. It may have something to do with the fact that I''m setting the grid DataSource to null before removing it from the controls as it seems to be trying to resize the columns when there is nothing in the DataSource. Any ideas how to get around this? thanks, Heath ************** Exception Text ************** System.IndexOutOfRangeException: Index was outside the bounds of the array. at Syncfusion.Windows.Forms.Grid.Grouping.GridTableModel.UpdateColumnWidths(Boolean force) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableModel.UpdateColumnWidths() at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.UpdateScrollBars() at Syncfusion.Windows.Forms.Grid.GridControlBase.OnSizeChanged(EventArgs e) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.OnSizeChanged(EventArgs e) at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight) at System.Windows.Forms.Control.UpdateBounds() at System.Windows.Forms.Control.WmWindowPosChanged(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.WndProc(Message& msg) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Administrator [Syncfusion]
Replied On May 18, 2005 01:18 AM UTC

I am not sure this will serve your needs or not. But this code did not throw any exceptions for me. this.gridGroupingControl1.DataSource = null; this.gridGroupingControl1.Visible = false; this.Controls.Remove(gridGroupingControl1); gridGroupingControl1.Dispose(); gridGroupingControl1 = null;

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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

;