jQuery UI Widgets Forums Grid condition to check if grid cells are empty.

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

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

  • ashwin prabhu
    Participant

    Hi,
    I extract grid data using below code.

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

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

    "name","roll no","city"
    " rohan "," 334 "," san jose "
    " sridevi "," 4 "," dallas "
    "  "," ","  "

    I want to save this grid data in a file. When i click on save button, i want to ensure that all the grid cells are filled and not empty. Like the last line of above output- the last row was left blank. Hence it took values as ” “,” “,” ”

    I want to make sure that user fills in each and every grid. How can i ensure that from happening ?


    Dimitar
    Participant

    Hi ashwin prabhu,

    You can implement a custom cell validation using the column callback function validation. You can see it in action in the demo Editing.

    Best Regards,
    Dimitar

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


    ashwin prabhu
    Participant

    Hi Dimitar,

    yes, custom cell validation works for a particular cell. I want to validate the entire grid cells at one go. for e.g. i want to ensure that none of the cells in the grid are empty before i save the grid data. It should show a popup when i press “Save” indicating that some of the grid cells are empty.


    ashwin prabhu
    Participant

    okay. i think i got wat u meant. similar validation technique can be put for the entire grid as we do it for individual cells. I over analyse your comments and times and then i get wat you mean. Thanks. I will try it tomorrow and see if it works.

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

You must be logged in to reply to this topic.