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

Removing columns from a GDBG (2.1.0.9)

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?

2 Replies

AD Administrator Syncfusion Team 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.


BD Bruce Davis February 28, 2005 04:23 PM

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

Loader.
Live Chat Icon For mobile
Up arrow icon