Home Forums WinForms controls Xceed Grid for WinForms Remove columns at runtime

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16754 |

    Is it possible to remove columns at runtime via the Grid control (rather than explicitly in code)?

    It seems like it’s something the control would support; I drag a column header and a big ‘X’ appears over my cursor, suggesting that if I drag the column out it would be removed, but when I release mouse button, the column stays in place. Perhaps I am misinterpreting the ‘X’, when it really means ‘you can’t drop this control here’?

    (I am able to reorder the columns in the grid, but not remove them.)

    I have not yet tried, but I also assume I could add columns at runtime (using code triggered from some other control/event)?

     

    rJ

    Imported from legacy forums. Posted by RJ (had 562 views)

    User (Old forums)
    Member
    Post count: 23064

    You can’t remove columns from the GridControl, it has do be done through code.  As for adding columns, it would have to be through another control or event, as you suggested, and I see no problem doing this.

    Imported from legacy forums. Posted by André (had 129 views)

    User (Old forums)
    Member
    Post count: 23064

    Are there any events I can hook into when columns are moved around, ideally off-screen?

     Or alternately, am I able to add icons (say an ‘X’ indicating ‘remove’) to the column headers?

    Imported from legacy forums. Posted by RJ (had 186 views)

    User (Old forums)
    Member
    Post count: 23064

    I have worked something out using MouseDown/MouseUp events on the cellColumnManagerRow

    Imported from legacy forums. Posted by RJ (had 600 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.