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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi