Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Oct 2007
    Posts
    48
    Vote Rating
    0
    cprabha is on a distinguished road

      0  

    Default How to display a dynamic message in Paging Toolbar in addition to the defaultmsg

    How to display a dynamic message in Paging Toolbar in addition to the defaultmsg


    Hi,

    How to display a dynamic message in Paging Toolbar
    I am having a grid with Paging.

    There is a button "Receive Latest Records" , it fetch the latest records to the grid.

    If any new records came(eg 2 record) , i need to display the text "2 records received" in paging toolbar.

    If any no new records during click , i need to display the text "No new records received" in the paging toolbar(Replace the above text)

    Kindly help me to solve the issue.



  2. #2
    Sencha User BitPoet's Avatar
    Join Date
    Sep 2008
    Location
    Bavaria
    Posts
    277
    Vote Rating
    1
    BitPoet is on a distinguished road

      0  

    Default


    Just a quick'n'dirty extension for the PagingToolbar:
    Code:
        Ext.ux.PagingStatusToolbar = function(cfg) {
            Ext.ux.PagingStatusToolbar.superclass.constructor.call(this, cfg);
        };
        Ext.extend( Ext.ux.PagingStatusToolbar, Ext.PagingToolbar, {
            statusText:    false
            ,statusMsg:    ''
            ,setStatus:    function( str, recs, opts, statusEl ) {
                statusEl.el.innerHTML = String.format( this.statusMsg, recs.length );
            }
            ,onRender:    function(ct, position) {
                Ext.ux.PagingStatusToolbar.superclass.onRender.call( this, ct, position );
                this.statusText = this.addText(' ');
                this.store.on( 'load', this.setStatus.createDelegate(this, [this.statusText] ,true) );
            }
        });
    The PagingStatusToolbar takes an additional parameter, "statusMsg", a text which will expand "{0}" to the number of records loaded.

Thread Participants: 1