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
95
Row Count In WebDataGrid - After filtering
posted
Hi, I am having the WebDataGrid, and using the Filtering behaviour of the grid. I am having a Textbox, where i need to display the total no.of records. For example, 1. Default records from DB/ODS - 100 2. Page size - 10records / page Output should be 100records in the text box. Example 2, 1. Default records DB/ODS - 100 2. Page size - 10records / page 3. On Filtering, it returns 50redords Output should be 50records in the text box. Exact problem is, i can able to identify exact row count 50 from the FIltering/Filtered event, but due to ODS, page postbacks once again, where Filtering/Filted event is not getting hit. So im losing the value 50. Now, i want to find out the row count in Databound event which gets hit each and every time, so here is the code snippet, i used protected void wdgRatios_DataBound(object sender, EventArgs e) { Disable Paging ((WebDataGrid)sender).Behaviors.Paging.Enabled = false; int filteredRowsCount = ((WebDataGrid)sender).Rows.Count; //Enable Paging ((WebDataGrid)sender).Behaviors.Paging.Enabled = true; } But the problem is, if the page size is 10, then Rows.Count gives the value as 10. But as per my requirement, i need to find out the TOTAL RECORD count after filtering. Plz help me guys.
Parents Reply Children
No Data