PDA

View Full Version : [CLOSED] Paging Toolbar when filtering



Geovision
Apr 08, 2016, 1:55 PM
Hello,

I have a gridpanel with gridfilter and in the bottom I have the paging toolbar with Paging Toolbar.
When filtering gridpanel data the Paging Toolbar says that the grid is displaying the number of filtered data and the total of filtered data as show in the attached image. Is there a way to show number of filtered data and the initial total rows. Or can Paging Toolbar text be customized which means I decide what I want to be shown?

fabricio.murta
Apr 08, 2016, 2:46 PM
Hello @Geovision!

You can customize shown text by paging toolbar by its various *Text settings. For example, there's AfterPageText and BeforePageText to customize what's shown in the "Page N of M" string.

Hope this helps!

Geovision
Apr 08, 2016, 3:57 PM
Hello ,

i guess you misunderstood our requirement.
kindly , when the column filter is applied, our request is to show the Filtered data count out of the Total number of records in the Displaying status bar.

Image 1: is the total Number of records in the Grid Panel
Image 2 : is the filtered data count

Our Request is to show "image 3:" Displaying Filtered data count out of Total number of records.

245512455224553

fabricio.murta
Apr 10, 2016, 1:59 PM
Hello @Geovision!

I still can only think on the same thing. You have to change the display string property of the pager to show what you want. Even if you program deep inside the pager to make this work "natively" you will end up changing the display message on the paging bar.

More specificly you need to change the displayMsg property of the paging toolbar, similarly to this example, but adding the full count of the grid as you want: GridPanel > Paging and Sorting > Page (http://examples4.ext.net/#/GridPanel/Paging_and_Sorting/Page/).

I hope this helps. If not, I'm afraid we'll require you to show us an example code of how your grid works and step thru the situation you can't reproduce.

Geovision
Apr 11, 2016, 11:03 AM
If this is the case , can i add a variable in the Paging Toolbar DisplayMsg Property.


ex:

<ext:PagingToolbar
runat="server"
DisplayInfo="true"
DisplayMsg="Displaying employees @variable1 out of @Variable2"
EmptyMsg="No employees to display"
/>

fabricio.murta
Apr 11, 2016, 3:05 PM
Hello @Geovision!

You have to do so either from JavaScript or C#. For example, you may give the paging toolbar an ID and bind it the updated value as the page loads, for example, in Page_Load() (C#):



PagingToolbar1.DisplayMsg = "Displaying all " + employee.Count + " employees.";


And when the filter is applied, bind an event to update the message, for example assuming you do from JavaScript:


App.PagingToolbar1.displayMsg = "Displaying " + filteredCount + " out of " + totalEmpCount + " employees.";


I hope this helps!