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
385
Column moving with invisible columns
posted

Hi,

I hope you can help me once again. In my application, i allow users to configure the grid by hiding and reordering columns. I built my own dialog for user-interaction and afterwards i set up the grid programmatically.

Hiding is done with "$('#grid').igGrid('hideColumn', columnKey);" (and unhiding of course the same way with "showColumn").

To reorder the columns "$('#grid').igGridColumnMoving('moveColumn', columnKey, index);". Assuming i'm having 10 columns, i run though them all from the end and move them to index 0. 

Hiding and moving works fine, but once i try to unhide a column, i'm getting an error ("property "start" of undefined or nullreference not found"). A workaround is setting all columns visible before moving them, but that seems a little bit dirty to me.

I'm currently on the latest version i guess (13.2.20132.2012), it would be nice if you could take a look into that.

Thanks in advance

Lorenz

Parents
  • 5513
    Offline posted

    Hello Lorenz,

    I am still trying to reproduce your issue and if I do I'll certainly log it so it receives attention. However, I think such column rearrangement combined with showing and hiding columns to match a separate column control's state is best done with destroying and recreating the grid with a new column collection in the appropriate order and with "hidden" properties appropriately set for each column. Your solution, even without having to show all columns before moving them, will be multiple times slower than simply re-rendering it due to the hefty amount of DOM manipulation involved. This is also why ColumnMoving does not have UI or an API method that allows for supplying a new random arrangement of the columns as input.

    I'll let you know when I manage to reproduce the issue. Thank you for using Infragistics forums!

    Best regards,

    Stamen Stoychev

Reply Children