Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / Row Count on Loaded and Filtered

Row Count on Loaded and Filtered

New Discussion
Rob Banning
Rob Banning asked on Apr 30, 2013 4:14 PM

I suspect this has been asked and answered previously, but I have not found the info…

I would like to display row counts after my igGrid is filtered. For example, 400 of 500 records displayed.

I am using local filtering in advanced mode and have a dataFiltered handler…

var _filtered = function(e, arg) {

var total = …. //total number of rows in the grid

var filtered = … //number of rows visible after the grid has been filtered

$(‘#status’).text(filtered+ ” of ” + total + ” records displayed.”);

};

How can I find the total number or rows and the number visible after filtering?

Also, is there an event to which I can bind where I can initialize the status with the total number of rows in the grid?

$(‘#grid’).on(‘iggridloaded’, function () {

var total = … // total rows in the grid

$(‘#status’).text(total + ” records”);

});

Thanks for the help

ROB

Sign In to post a reply

Replies

  • 0
    [Infragistics] Nikolay
    [Infragistics] Nikolay answered on Apr 30, 2013 7:44 AM

    Hello Rob,

    You can get the number of rows displayed in the grid using the following syntax:

    $(‘#grid1’).igGrid(‘rows’).length

    And the total number of rows:

    $(‘#grid1’).igGrid(‘option’,’dataSource’).length

    And about your second question – I would suggest you to handle the created event. Here you can find all events and their descriptions – https://www.igniteui.com/help/api/2025.1/ui.iggrid#events.

    Please let me know if you have any questions.

    • 0
      Rob Banning
      Rob Banning answered on Apr 30, 2013 4:14 PM

      Excellent.

      Thanks for your help.  I was thinking of handling the rowsRendered event which appears to be triggered when the grid initially displays and when a filter is applied.  This would replace handling both the dataFiltered and created events.

      Again, 

      Thank you for the help.

      ROB

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Rob Banning
Favorites
0
Replies
2
Created On
Apr 30, 2013
Last Post
12 years, 10 months ago

Suggested Discussions

Created by

Created on

Apr 30, 2013 4:14 PM

Last activity on

Feb 23, 2026 1:28 PM