jQuery UI Widgets Forums Grid Remove last column from json data

This topic contains 2 replies, has 2 voices, and was last updated by  purnima 9 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Remove last column from json data #73905

    purnima
    Participant

    Hi Team,

    I have the entire grid data which i transfer it to a variable named ‘data’ as shown below.

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

    The output of console.log(data); is as follows:

    
    [{"Order":"1.00","Id":"345.00","Comment":"Do this"},
    {"Order":"2.00","Id":"475.00","Comment":"Dont do this"}]
    
    

    Before transferring this ‘data’ through ajax, i want to ensure that i skip the “Comment:” part of each json object value pair.
    My final json data which i am sending should look like this.

    
    
    [{"Order":"1.00","Id":"345.00"},
    {"Order":"2.00","Id":"475.00"}]
    
    

    Can someone please tell me how do i achieve this. ?

    Remove last column from json data #73924

    Dimitar
    Participant

    Hi purnima,

    You just need to set the “Comment” column’s exportable property to false.

    Best Regards,
    Dimitar

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

    Remove last column from json data #73961

    purnima
    Participant

    Dimitar,
    This is so cool… Thanks.. 🙂

    Regards,
    Purnima

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

You must be logged in to reply to this topic.