Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
UltragridColumnChooser column reordering
posted

 Hi, is it possible to use the columnchooser control to allow users to change the source grid's column display order?  Our users keep dragging columns up and down from within the columchooser control thinking that they could change the display order that way.  If there is no current functionality to do that, how can I disable the dragging within the columnchooser control?

Parents
  • 2070
    Verified Answer
    posted

    Hi,

     Column chooser doesn't support changing order by dragging and dropping inside of it. However you can drag a column from the column chooser and drop it inside the source grid at the location you want the column to be among other column headers. When you drag a column from a column chooser and try to drop it inside it, it will not display any drop indicators. It does however display drop indicators when you try to drop the column inside the source grid over the existing column headers in the grid.

     Having said this, there is no built-in property to disable dragging within the column chooser. How do you expect this to work? Do you want to completely disable dragging of columns from the column chooser so that the user can not drag and drop it inside even the source grid? If so then you might be able to hook into MouseCaptureChanged event of the column chooser control inside the column column chooser dialog and release capture so dragging gets stopped as soon as it starts. However if you want to retain this functionality of being able to drop inside source grid then you would have to show some kind of cursor or indicator that says you cannot drop inside the column chooser. However this means that this cursor will show immediately as soon as you start dragging inside the column chooser until you move out. This may not be desirable.

     Sandip

     

Reply Children