jQWidgets Forums

jQuery UI Widgets Forums Grid Best way to hide columns in JQX Grid

This topic contains 5 replies, has 3 voices, and was last updated by  rajendra 11 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Best way to hide columns in JQX Grid #24072

    Syai
    Participant

    Hi,
    I’m using Inline edit functionality in JQX Grid. Here I’ve nearly 35 columns will be used in the grid. At the time of load I’ve check different conditions and show particular columns in the grid instead of showing all the columns. So I put the code of hiding columns in the Load complete event of the grid. Initially the grid load took just 3 to 4 sec to show the data. But after adding the hide column code, it is taking nearly 20 to 30 seconds of time to show the data. Can any one suggest me the best way to hide the columns so that the grid load time shouldn’t be effected.

    Regards,
    Syai,
    Osmosys

    Best way to hide columns in JQX Grid #24075

    Peter Stoev
    Keymaster

    Hi,

    If you do multiple method calls that will cause a render operation, then you should do the following:

    1. call the Grid’s beginupdate method before your method calls.
    2. do your method calls.
    3. call the Grid’s endupdate method after your method calls.

    In addition, if you want to hide columns during the initialization process, then you may set the “hidden” property of each column to true.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Best way to hide columns in JQX Grid #24078

    Syai
    Participant

    Hi Peter,
    Thanks for the quick reply. I’ve a question, I’ve a page, when the page is loading, I’ll pass a value as input, depending on that input, it have to hide some columns and show other columns. If I pass another input, it has to check and hide some other columns. If I want to check these conditions, where do I check? Which is better way to check? On LoadComplete event? or On BindingComplete event? or is there any other way to achieve this?

    I’m sorry if the question isn’t valid.

    Regards,
    Syai

    Best way to hide columns in JQX Grid #24081

    Peter Stoev
    Keymaster

    Hi,

    As you may see from the documentation the Grid has a “bindingComplete” event. There is a “loadComplete” callback, but on the jqxDataAdapter. Note that these are called on each binding operation. The Grid also has a callback function which is called just once when the Grid is initialized and the callback is called “ready”.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Best way to hide columns in JQX Grid #24118

    Syai
    Participant

    Thank you Peter. This helps me a lot and the grid is loading very quick now.

    Regards,
    Syai Reddy D

    Best way to hide columns in JQX Grid #52188

    rajendra
    Participant

    Hi Peter,

    The best way to hide the columns when Grid initialization is setting hidden property to columns.

    But whenever I want to show the columns again, should I call showColumn for each column. Because I have total 100 columns, so the script is taking too much time( I have to iterate through the entire array).

    Can you please tell me, if there is any method/configuration at Grid Level to show all hidden columns(hidden = true to hidden = false) as well as to hide columns(hidden = false to hidden = true)

    Thanks in advance,
    Rajendra

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.