Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Total rows count on client side
posted

Hello everyone !!!!

Anyone could tell me how I can get the total of rows of the webdatagrid on client side ???

I'm in DataFilteredClientEvent and I know that "sender.get_rows().get_length()" throws me what I need, but if the quantity of rows exceeds the max of paging, I only get that max value but not the total.
I'm trying to disable the paging behavior before get_length() method and enable it after that but I dont know how to do that ...

Here is my code, in bold and italic are what I need !!

function GridView1_DataFilter(sender, eventArgs) {
   ///<param name="sender" type="Infragistics.Web.UI.WebDataGrid"></param>
   ///<param name="eventArgs" type="Infragistics.Web.UI.CancelApplyFiltersEventArgs"></param>

   sender.get_behaviors().get_paging().enabled = false;
   var tmp = sender.get_rows().get_length();
   sender.get_behaviors().get_paging().enabled = true;
   $("#lblTotal").text("Total: " + tmp);
}

Thanks to all,
Gustavo.-