Can I let my users swap columns via drag and drop? When I set grid.displaylayout.override.allowcolswapping to true, a little dropdown combo appears in each column, but to me that looks cluttered.
I think the ability to move the columns is the defaut action for the grid. If you want to retain the column position you have to save the layout to file and reload when the grid is loaded. Try removing the allowcolswapping line then click on a header and drag it. I think you'll see some big red lines pop up as you move it.
I'm not sure what you mean by removing the allowcolswapping line. I use the designer tool to set properties. But even if you are setting properties via code, not setting that particular value will result in the default behavior, which a simple test reveals to be no column swapping allowed.
I want drag and drop column swapping (or maybe "moving" would be a better term).
Dragging and dropping to move columns is on by default. It's controlled by the AllowColMoving property. So unless you explicitly turned this off, it should work.
ok, I tested a grid with no options set and the default for the ultrawingrid does allow the columns to drag & drop. Let me know.
I assume you're using ultrawingrid? I set all my options via code and the only reference I have to the header is:
e.Layout.Override.HeaderClickAction = HeaderClickAction.Default
When I click and hold on the column header I am able to relocate freely.