PDA

View Full Version : [CLOSED] PagingToolbar showing Page 1 of 0 in empty page



FpNetWorth
Nov 05, 2014, 8:43 AM
Hi,

I am using a Paging Toolbar to manage paging for a grid.

When the grid is empty, the the toolbar shows "Page 1 of 0".

Is it possible to manage it in a way to either show "Page 0 of 0" or "Page 1 of 1" when the grid is empty?

FpNetWorth
Nov 05, 2014, 9:02 AM
I am using the following code to change the value in the input field on store load



var onload = function (store) {
if (store.count() == 0) {
App.pagingToolbar.getInputItem().enable();
App.pagingToolbar.getInputItem().setRawValue(0);
App.pagingToolbar.getInputItem().setValue(0);
App.pagingToolbar.getInputItem().disable();
}
}

However the field doesn't seem to be changing.

FpNetWorth
Nov 05, 2014, 11:18 AM
It seems that there was another function that was executing which caused the value to return to its original.

A simple Delay="1" on the event made it work.



<Listeners>
<Load Fn="onload" Delay="1"></Load>
</Listeners>


This thread can be closed.