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.-
Hi Gustavo,
The approach you're thinking ("disable the paging behavior before get_length() method and enable it after") is the right approach to addressing this objective. I'm looking at that approach and will follow-up with you here.
Have you seen this post (http://es.infragistics.com/community/forums/t/70039.aspx)? This post shows how to accomplish getting the total filtered rows count.
Troy:
The problem with the total row count was solved successfully but now the behavior of paging does not work ...
When I click over a page number, the grid dont move to that part of the data. Do you know what could be ??? Before I implement your solution, the paging worked perfectly !!!
Thanks for all !!!
I've been watching what you posted and helped me so much ...
I'd could get the solution to my problem.
Thanks again !!!!