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

Removing columns from a GDBG (2.1.0.9)

Thread ID:

Created:

Updated:

Platform:

Replies:

25492 Feb 28,2005 01:53 PM Feb 28,2005 04:23 PM Windows Forms 2
loading
Tags: GridControl
Bruce Davis
Asked On February 28, 2005 01:53 PM

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 02:03 PM

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 04:23 PM

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

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.

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

;