jQuery UI Widgets Forums Grid bind grid to csv data

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • bind grid to csv data #61094

    josh
    Participant

    Hi community,
    I have a csv file that was poorly formatted from original source.
    for instance,at some point it contains a sequence of three commas following each other so the system would assume it for a delimiter and hence the resulting grid does not align the fields correctly.
    here is a sample data from the csv
    `joshua,peter,amos,,alexander,,,hamon,jairus,rogers,,david,
    is there a way the grid sytstem can eliminate this or remove the extra commas?
    and I would want it to skip the header row as well when writing the grid.
    your assistance will be much appreciated

    • This topic was modified 9 years, 4 months ago by  josh.
    bind grid to csv data #61100

    Dimitar
    Participant

    Hello josh,

    The comma is the delimiter in CSV data and you would have to remove the extra ones if you wish your grid to be loaded correctly.

    And could you, please, clarify your second query, about skipping the header row?

    Best Regards,
    Dimitar

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

    bind grid to csv data #61104

    josh
    Participant

    Hi Dimitar,
    My second question is I want to skip the first row when writing to grid as this is the header row of the csv.

    bind grid to csv data #61107

    Dimitar
    Participant

    Hi josh,

    When loading the data through data adapter, you can modify the loaded records in the beforeLoadComplete callback function (in this case – remove the first record). For more information, please refer to the jqxDataAdapter documentation.

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.