jQWidgets Forums

jQuery UI Widgets Forums Grid jqxgrid with csv source: empty row in grid

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • jqxgrid with csv source: empty row in grid #15741

    jb
    Participant

    Hi!

    the “bindingtocsv.htm” example works well for me, no questions.  But the source “csv” file (../sampledata/nasdaq_vs_sp500.txt) doesn’t contain a carriage return for the last row.  When providing a perl-made csv file, that contains “\n” at the end of every row, the grid now contains an empty row at the end of it.  Is there a workaround or I absolutely must get rid of that last carriage return?

    jqxgrid with csv source: empty row in grid #15748

    Peter Stoev
    Keymaster

    Hi jb,

    The rowDelimiter for “CSV” and “TSV” is “\n” so the rows count will be the number of “\n”. If you have an unnecessary “\n”, an empty row will be loaded. To remove that empty row, you can either delete it from the Grid after loading or update your data before loading it in the Grid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxgrid with csv source: empty row in grid #15837

    jb
    Participant

    Thanks Peter for the quick reply. I fixed this changing the file from the server side. but I’m still curious about what you mean by “delete it from the Grid after loading “. How would you go about doing that? Do you mean the user has to delete that row himself?

    jqxgrid with csv source: empty row in grid #15842

    Peter Stoev
    Keymaster

    Hi jb,

    jqxGrid has a “deleterow” method. If you have unnecessary “\n”, you can use the “deleterow” method to remove the unnecessary rows.

    Best Regards,
    Peter Stoev

    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.