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
60
Saving/Restoring the Widths of Columns
posted

Hi,

I'm looking for a way to save and restore the width of columns.  Some of the users of my software may want to manually size some columns and when they next visit the same page, they expect the columns widths to be the same as they were last time.  How would I do this?

BTW, I'm using the ASP.NET MVC wrappers.

Thanks,

Al

Parents
No Data
Reply
  • 23953
    Suggested Answer
    Offline posted

     Hello alai604,

    You can use Ajax post to save the column width as soon as user finishes column resizing. You should bind to igGridResizing's columnResized event.
    Example code:

    //Bind after initialization

    $(document).delegate(".selector", "iggridresizingcolumnresized", function (evt, ui) {

    // make your ajax call here

    // use ui.columnIndex or ui.columnKey to identify the column

    // use ui.newWidth to get the new width of the column

    });

    For performance reasons you should set deferredResizing property to true.

    For more information on columnResized event you can check our online API documentation:

    http://help.infragistics.com/jQuery/2011.2/ui.iggridresizing#events

     

    If you need information on how to use jQuery Ajax functions:

    http://api.jquery.com/jQuery.post/

     

    Hope this helps,

    Martin Pavlov

    Infragistics, Inc.

Children