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
    Jun 2007
    Posts
    2
    Vote Rating
    0
    fractorr is on a distinguished road

      0  

    Lightbulb Grid Paging

    Grid Paging


    I came up with this to be able to change the number of records per page in a grid. Not sure if this is the best method to do it but it works.

    Code:
        var gridFoot = grid.getView().getFooterPanel(true);
    
        // add a paging toolbar to the grid's footer
        var paging = new Ext.PagingToolbar(gridFoot, ds, {
            pageSize: 25,
            displayInfo: true,
            displayMsg: 'Displaying {0} - {1} of {2}',
            emptyMsg: "No information to display"
        });
    
        PerPageData = [
            ['10', 	'10'],
            ['25', 	'25'],
            ['50', 	'50'],
            ['100', '100'],
            ['0', 	'ALL']
        ];
        var ppstore = new Ext.data.SimpleStore({
            fields: ['num', 'txt'],
            data : PerPageData
        });
    
        var perPage = new Ext.form.ComboBox({
            store: ppstore,
            displayField:'txt',
            typeAhead: true,
            mode: 'local',
            triggerAction: 'all',
            selectOnFocus:true,
            resizable:true,
            listWidth: 50,
            width: 50,
            value: '25'
        });
    
        function setPerPage()
        {
        	if (perPage.getValue() != 'ALL')
        	{
    	    	paging.pageSize = parseInt(perPage.getValue());
        	}
        	else
        	{
        		paging.pageSize = ds.getTotalCount();
        	}
    
    		paging.cursor = 0;
    		ds.load({params:{start: paging.cursor, limit: paging.pageSize}});
        }
        perPage.on("select", setPerPage);
    
    	paging.addSeparator();
    	paging.addText("Per Page");
    	paging.addField(perPage);

  2. #2
    Sencha User
    Join Date
    Apr 2007
    Location
    Ettlingen, Germany
    Posts
    65
    Vote Rating
    0
    Mark is on a distinguished road

      0  

    Smile


    Thank you ver much for sharing this code snippet! Works great!

    Greets,
    Mark

  3. #3
    Touch Premium Member
    Join Date
    Jul 2007
    Location
    Garland, Texas
    Posts
    46
    Vote Rating
    0
    HeathT is on a distinguished road

      0  

    Default


    Very nice! Great snippet!

    Thanks for sharing,
    Heath

  4. #4
    Ext User
    Join Date
    Jun 2007
    Posts
    2
    Vote Rating
    0
    fractorr is on a distinguished road

      0  

    Default


    Good to know someone actually found it useful.

  5. #5
    Ext User
    Join Date
    Jun 2007
    Posts
    2
    Vote Rating
    0
    odpsoft is on a distinguished road

      0  

    Post Good method

    Good method



    the method great!these code is fine in work!

  6. #6
    Ext User
    Join Date
    Aug 2007
    Posts
    96
    Vote Rating
    0
    vibez is on a distinguished road

      0  

    Default


    Fantastic code, cheers!

  7. #7
    Ext User
    Join Date
    Jan 2008
    Posts
    4
    Vote Rating
    0
    sottwell is on a distinguished road

      0  

    Default


    Can you please clarify how to use this code? If I have
    Code:
        var grid = new Ext.grid.GridPanel({
            el:'topic-grid',
            width:985,
            height:500,
            title:'View Data',
            store: store,
            cm: cm,
            trackMouseOver:false,
            loadMask: true,
            enableHdMenu: false,
            bbar: new Ext.PagingToolbar({
                pageSize: 25,
                store: store,
                displayInfo: true,
                displayMsg: 'Displaying rows {0} - {1} of {2}',
                emptyMsg: "No data to display",
                paramNames: {start: 'start', limit: 'limit'}
            })
        });
    
        grid.render();
    where would I use this? Or can I use it at all with this format?

  8. #8
    Sencha User
    Join Date
    Feb 2008
    Posts
    19
    Vote Rating
    0
    santiago is on a distinguished road

      0  

    Default Great code!

    Great code!


    Sweet!!

  9. #9
    Sencha User
    Join Date
    Aug 2012
    Posts
    34
    Vote Rating
    0
    nagalla038 is on a distinguished road

      0  

    Default Grid Paging

    Grid Paging


    Quote Originally Posted by Mark View Post
    Thank you ver much for sharing this code snippet! Works great!

    Greets,
    Mark
    Hi Mark,

    Can you tell me how to add an option of selecting number of records to be displayed in a grid when my code is like this:


    var grid = new Ext.grid.GridPanel({ el:'topic-grid', width:985, height:500, title:'View Data', store: store, cm: cm, trackMouseOver:false, loadMask: true, enableHdMenu: false, bbar: new Ext.PagingToolbar({ pageSize: 25, store: store, displayInfo: true, displayMsg: 'Displaying rows {0} - {1} of {2}', emptyMsg: "No data to display", paramNames: {start: 'start', limit: 'limit'} }) }); grid.render