jQuery UI Widgets Forums Grid No export if cell empty

This topic contains 1 reply, has 2 voices, and was last updated by  ivailo 8 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • No export if cell empty #74687

    ashwin prabhu
    Participant

    Hi Team,

    https://jsfiddle.net/ashwinsneha/46wp92ja/5/

    Please check this link. I have used validation for the first column “FirstName” by using below code

    validation: function (cell, value) {
                  if (isNaN(value)) {
                      return {
                          result: false,
                          message: "Please enter numbers"
                      };
                  }
                  if (value == "") {
                      return {
                          result: false,
                          message: "Required"
                      };
                  }
                  return true;
              }

    Now if i edit any name and put blank. It will give me a warning saying “Required”

    However when i click on export to CSV, it gets exported. I want to ensure that none of the data gets exported unless user completes the validation. What should be done in this case ?

    No export if cell empty #74689

    ivailo
    Participant

    Hi ashwin prabhu,

    Set a boolean variable to check the success of the validation.
    Here is the demo.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.