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://ko.infragistics.com/community/forums/t/70039.aspx)? This post shows how to accomplish getting the total filtered rows count.