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

Removing columns from a GDBG (

Thread ID:





25492 Feb 28,2005 06:53 PM UTC Feb 28,2005 09:23 PM UTC WinForms 2
Tags: GridControl
Bruce Davis
Asked On February 28, 2005 06:53 PM UTC

I need to be able to remove a column from a GDBG based on a context menu action. My context menu handler code looks something like this: // ... determine what GBCs to remove this._grid.BeginUpdate(); this._grid.Binder.SuspendBinding(); foreach (GridBoundColumn gbc in remove) this._grid.GridBoundColumns.Remove(gbc); this._grid.Binder.ResumeBinding(); this._grid.EndUpdate(true); this._grid.Refresh(); this._grid.UpdateScrollBars(); While this seems to remove the column, the grid ends up with a bogus, empty column on the far right of the grid. It''s as if columns were slid to the left to fill in the gap but the leftover space wasn''t trimmed off. What am I missing?

Administrator [Syncfusion]
Replied On February 28, 2005 07:03 PM UTC

Try also calling grid.Binder.InitializeColumns after removing the column to see if this takes care of this problem.

Bruce Davis
Replied On February 28, 2005 09:23 PM UTC

The call to InitializeColumns() did the trick. Thanks for your help.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon