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

  • Home
  • SEARCH
  • 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 7444795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:35:25+00:00 2026-05-29T11:35:25+00:00

I have a DataTable object that contains all the data for a Table visualization.

  • 0

I have a DataTable object that contains all the data for a Table visualization.

I want to provide a search facility for users of the table, filtering the rows from the Table based on the search query, and then update the visualization with the rows that matched.

DataTable provides the getFilteredRows method, but this is not going to be flexible enough (AND conditions for each column simply won’t work, for example).

What are my options? All the data already exists client-side, so I should be able to manipulate it using JS code. Is there library functionality that will allow me to do this?

  • 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-05-29T11:35:26+00:00Added an answer on May 29, 2026 at 11:35 am

    The answer, for now, appears to be no. I came up with this dreadfully-inefficient function as a stop-gap:

      function search(query, table) {
    
          if(query == '') {
              return table;
          }
    
          var newTable = table.clone();
              newTable.removeRows(0, table.getNumberOfRows());
          var keepRows = [];
          for(i = 0; i < table.getNumberOfRows(); i++) {
              for (j = 0; j < table.getNumberOfColumns(); j++) {
                    if(table.getValue(i, j).toLowerCase().match(query.toLowerCase())) {
                        keepRows.push(i);
                        break;
                    }
            }
          }
    
          for(r = 0; r < keepRows.length; r++) {
                var row = []
              for(c = 0; c < table.getNumberOfColumns(); c++ ) {
                  row.push(table.getValue(keepRows[r], c));
              }
    
              newTable.addRow(row);
          }
    
          return newTable;
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a session object that contains a DataTable from my previous page, and
I currently have a Richfaces dataTable bound to a backing bean that contains all
This is tricky to explain. We have a DataTable that contains a user configurable
I have a page that contains a record of a database. I want to
I have a Business Object which contains a DataTable among other properties. I pass
I have an Excel 2007 workbook that contains tables of data that I'm importing
I have a DataTable object, dTable, where all the DataColumn datatypes are either string
I have a datatable that contains simple Key Value pair how do I return
I have a ListView that contains 3 checkboxes per row. I want to set
I have a DataTable object. Every column is of type string. Using LINQ, how

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.