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
35
Use History.js to save shown igGrid columns
posted

Hi,

is there any way to save chosen columns in history.js and/or diplay it in url? 

You have working solution for sorting here: http://www.igniteui.com/grid/history/?sort=goals_descending;assists_descending (on asc/dsc registering changes in url),

and I want to do the same when filtering columns to be Shown/Hidden, if it is possible?

Thanks!

 

  • 4315
    Suggested Answer
    Offline posted

    Hi, Adavachi.

    I'm attaching an HTML file, that is a modification of the following sample, including Grid hiding features. You can check the code and see if it is working for you. Please note that you need to handle the URL creation and modification, because hide and show for a single column are two opposite actions and you don't need both in the URL. If you need further assistance on that or anything else, don't hesitate to ask.

    Regards,

    Nikolay Alipiev

    Software Developer

    history.rar
  • 4315
    Suggested Answer
    Offline posted

    Hi, Adavachi.

    If you are talking about integration of igGrid Hiding feature and historyJS, yes it is possible? You just need to use the corresponding events for the hiding feature, save the state of the columns (like column index or key), before hiding/showing so that you can recover it later. After that, using the hideColumn / showColumn, you can recover previous states using the already saved state. I will wait for your feedback, if you need more help of how to implement this(if you need some code), or if you have some issues with the implementation.

    Thank you for using our product.

    Best regards,

    Nikolay Alipiev