jQWidgets Forums

jQuery UI Widgets Forums Grid Optional parameter to remove column header

Tagged: ,

This topic contains 5 replies, has 2 voices, and was last updated by  Peter Stoev 9 years, 10 months ago.

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

  • purnima
    Participant

    Hi,
    I am using this exportdata function to extract my grid contents.

    var grid_data = \$("#jqxgrid").jqxGrid('exportdata', 'json');

    Could you please let me know the third optional paramter which i should mention in order to remove the column header. currently i see column headers too listed in the variable ‘grid_data’


    Peter Stoev
    Keymaster

    Hi purnima,

    As I pointed you out on: http://www.jqwidgets.com/community/topic/how-to-format-complete-grid-data-extracted/, please refer to the Grid’s API Documentation page where you will find information about the “exportdata” method and its available parameters. Please, also keep in mind that I know that “Raj Desai” and “purnima” are 1 person.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    purnima
    Participant

    Hi Peter,
    Excuse me for creating 2 profiles. Had the documentation been good, we would not have had so many questions to ask. Nor i had to create 2 accounts.

    var grid_data = \$(“#jqxgrid”).jqxGrid(‘exportdata’, ‘csv’, ‘jqxGrid’, false);

    This is the fourth parameter and you pointed out third parameter in the documentation. How can a novice know about these dissimilarities ?

    Please note: the questions asked in the forum are all asked by me. I have several accounts. I would like to thank you anyway for helping me out with the difficulties.


    Peter Stoev
    Keymaster

    Hi purnima,

    This is the 3rd parameter. “exportdata” is not parameter. It is the method’s name. About the questions – I know that they are all asked by you. No problem to write from as many accounts as you wish. Just avoid double or triple posting, because that does not bring any green points.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    purnima
    Participant

    Hi Peter,
    Sometimes if we see 2 voices in a topic, it may get missed and query would remain unsolved. Hence i thought it is better to put it so it is easy for you to keep a tab on the posts.

    anyways, here is the problem

    var data = \$("#jqxgrid").jqxGrid('exportdata', 'csv','data',true);

    If i mention 2nd parameter as ‘data’ and third as true. The grid data gets saved in a csv file with name ‘data’ along with header. The file gets saved in local drive.

    var data = \$("#jqxgrid").jqxGrid('exportdata', 'csv','data',true);

    If i do the above thing, file gets saved with the header.

    Earlier, i used to do this and data would not get automatically downloaded. I could use the data in previous scenario and transfer it through ajax for server side manipulation. Here is the code for that.

    var data = \$("#jqxgrid").jqxGrid('exportdata', 'csv');

    The first two codes doesnot allow me to save data in a variable and manipulate later. It automatically downloads the data in a csv file at users machine.


    Peter Stoev
    Keymaster

    Hi purnima,

    1. It depends on the user’s morale and respect to other users whether to post from multiple accounts in multiple topics or not. Other users who post here also have questions which are important for them.
    2. That is because in some of your method calls, you set the filename parameter and in others you do not. ‘data’ is your filename parameter.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.