Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8078525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:49:24+00:00 2026-06-05T15:49:24+00:00

Q1:What is the best way to validate the data entered by user in jQuery

  • 0

Q1:What is the best way to validate the data entered by user in jQuery Handsontable before sending to Server?

I have read this article
Upload jQuery Handsontable input

Is there any integrate solution? etc integrating to the jquery validation plugin,if not, how about using the onbeforechange() method?

Q2:What’s more, I have initiated a 100 rows table , but it’s probably the user would input only 50 rows, if I use the code below:

$('#btnGo').click(function() { 
  var rowList = $("#example9grid").handsontable("getData"); 
  $('#simple').val(JSON.stringify(rowList)); 
  console.log(rowList); 
});​ 

the rowList would return 50 data rows and 50 empty rows.

How to remove all the empty rows?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:49:26+00:00Added an answer on June 5, 2026 at 3:49 pm

    A1:Thanks for Marcin’s reply,I have solved this problem by using these code below:

    onBeforeChange: function (data) {
          for (var i = 0, ilen = data.length; i < ilen; i++) {
                if (data[i][0] > 0) { //if it is not first row
                    if(data[i][1]==0){ //if it is the first column
                            //some validate logic here
                }else if(data[i][1]==1){//if it is the second column
                            //some validate logic here
                        }
                }
            }
          };
    

    A2:I have remove the empty row by using these code below:

    rowList = $("#dataTable").handsontable("getData");
    rowList = $.grep(rowList,function(array,index){
                ...write your logic here
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The best way of describing this is I have a table of people with
what is the best way to validate JSON data in Django/python. Is it best
I'm trying to figure out the best way to validate data within a MVC
What's the best way to validate an XML file (or a portion of it)
I was wondering, what would be the best way to validate an integer. I'd
Which is best way to upload single file with asp.net mvc3 razor and validate
the best way to explain is with example so: this is the model public
The best way I can think of to ask this is by example... In
What's the easiest way to clear this form after refresh. The way I have
I'm using PHP to validate form input before the form data's submitted to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.