Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Paging grid in tab with horizontal autoScroll

  1. #1
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460

    Default Paging grid in tab with horizontal autoScroll

    Please give advice.
    In Paging grid in tab doesn't scroll horizontal.
    But usual grid in other tab does scroll horiazontal.


    I tried to use autoScroll in tab in element with tab panel
    with params
    Code:
    defaults:{ autoScroll:true },
    Now I use defaults:{ autoScroll:true }, But that still doesn't work howerer the other but usal grid works
    Code:
    Ext.getCmp('center').add({
    				title:'????????????',
    				iconCls:'smallImageUsers',
    				closable:true,
    				padding:'5 5 5 5',
    				items: [{
    					xtype: 'grid',
    					store: store,
    					autoHeight:true,
    					columns: [
    							{header: 'ID', dataIndex: 'id', renderer: user_id_renderer,width:20},
    							{header: 'Email', dataIndex: 'email',renderer: email_renderer,width:100},
    							{header: '??????', dataIndex: 'parol', renderer: parol_renderer,width:100},
    							{header: '?????? ?????????', dataIndex: 'firstVisit', renderer: firstVisit_renderer,width:100},
    							{header: '??????? ?????????', dataIndex: 'prevVisit', renderer: prevVisit_renderer,width:100},
    							{header: 'IP', dataIndex: 'ip', renderer: ip_renderer,width:100},
    							{header: '?????????? ? ??????? ???????????? ??? ?????? ?????????', dataIndex: 'dataOfUserSystem', renderer: dataOfUserSystem_renderer,width:100},
    							{header: '?????????? ?????', dataIndex: 'money', renderer: money_renderer,width:100},
    							{header: '??????? ?? ???? ?????', dataIndex: 'thisMonthPaid', renderer: thisMonthPaid_renderer,width:20},
    							{header: '??? ?????????? ??????', dataIndex: 'allMonthPaid', renderer: allMonthPaid_renderer,width:100},
    							{header: '???', dataIndex: 'ban', renderer: ban_renderer,width:20},
    							{header: '??? ???????? + ? ????????', dataIndex: 'rateIdPlus', renderer: rateIdPlus_renderer,width:100},
    							{header: '??? ???????? - ? ????????', dataIndex: 'rateIdMinus', renderer: rateIdMinus_renderer,width:100},
    							{header: '?????????? + ? ????????', dataIndex: 'rateNPlus', renderer: rateNPlus_renderer,width:20},
    							{header: '?????????? - ? ????????', dataIndex: 'rateNMinus', renderer: rateNMinus_renderer,width:20},
    							{header: '??? ?? ?????', dataIndex: 'banMonth', renderer: banMonth_renderer,width:20}
    					],
    					bbar: new Ext.PagingToolbar({
    						pageSize: 20,
    						store: store,
    						displayInfo: true,
    						displayMsg: 'Displaying topics {0} - {1} of {2}',
    						emptyMsg: 'No topics to display'
    					})
    				}]
    			}).show();
    		}

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    You are adding a Panel CONTAINING a GridPanel instead of just doing what the API docs say, and adding a GridPanel.

  3. #3
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460

    Default

    Please can you give me a reference what to read to fix it

  4. #4
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    add the GridPanel

    How can I say it simpler?

  5. #5
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460

    Default

    but
    Code:
    xtype:'gridpanel'
    doesn't work

  6. #6
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Of course not.

    "xtype:'gridpanel' on its own? Of course it means nothing.

  7. #7
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460

    Default

    But how then?
    Could you be so kind to give me advice?
    Something like this?
    Code:
    Ext.getCmp('center').add( new Ext.GridPanel({
    				title:'????????????',
    				iconCls:'smallImageUsers',
    				closable:true,
    				padding:'5 5 5 5',
    				items: [{
    					xtype: 'grid',
    					store: store,
    					autoHeight:true,
    					columns: [
    I'm not so good in ExtJS yet, please give me advice.

  8. #8
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Uhhhhh!!!!


    WHY?

    WHY DO YOU WANT to put the grid INSIDE something???

    ADD.

    A GRID.

    TO THE TABPANEL.

    That's it, there's nothing else I can say.

    Add the grid to the TabPanel.

    Not something which CONTAINS a grid.

    A GRID!

  9. #9
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460

    Default

    I did as you said, thanks for advice.I didn't understand the idea,
    but hotrizontal scroll doesn't work still
    Code:
    Ext.getCmp('center').add(
    				new Ext.grid.GridPanel({
    					title:'????????????',
    					iconCls:'smallImageUsers',
    					layout:'fit',
    					closable:true,
    					padding:'5 5 5 5',
    					store: store,
    					autoHeight:true,
    					autoScroll:true,
    					columns: [
    						{header: 'ID', dataIndex: 'id', renderer: user_id_renderer,width:20},
    						{header: 'Email', dataIndex: 'email',renderer: email_renderer,width:100},
    						{header: '??????', dataIndex: 'parol', renderer: parol_renderer,width:100},
    						{header: '?????? ?????????', dataIndex: 'firstVisit', renderer: firstVisit_renderer,width:100},
    						{header: '??????? ?????????', dataIndex: 'prevVisit', renderer: prevVisit_renderer,width:100},
    						{header: 'IP', dataIndex: 'ip', renderer: ip_renderer,width:100},
    						{header: '?????????? ? ??????? ???????????? ??? ?????? ?????????', dataIndex: 'dataOfUserSystem', renderer: dataOfUserSystem_renderer,width:100},
    						{header: '?????????? ?????', dataIndex: 'money', renderer: money_renderer,width:100},
    						{header: '??????? ?? ???? ?????', dataIndex: 'thisMonthPaid', renderer: thisMonthPaid_renderer,width:20},
    						{header: '??? ?????????? ??????', dataIndex: 'allMonthPaid', renderer: allMonthPaid_renderer,width:100},
    						{header: '???', dataIndex: 'ban', renderer: ban_renderer,width:20},
    						{header: '??? ???????? + ? ????????', dataIndex: 'rateIdPlus', renderer: rateIdPlus_renderer,width:100},
    						{header: '??? ???????? - ? ????????', dataIndex: 'rateIdMinus', renderer: rateIdMinus_renderer,width:100},
    						{header: '?????????? + ? ????????', dataIndex: 'rateNPlus', renderer: rateNPlus_renderer,width:20},
    						{header: '?????????? - ? ????????', dataIndex: 'rateNMinus', renderer: rateNMinus_renderer,width:20},
    						{header: '??? ?? ?????', dataIndex: 'banMonth', renderer: banMonth_renderer,width:20}
    					],
    					bbar: new Ext.PagingToolbar({
    						pageSize: 20,
    						store: store,
    						displayInfo: true,
    						displayMsg: 'Displaying topics {0} - {1} of {2}',
    						emptyMsg: 'No topics to display'
    					})					
    				})	
    			).show();

  10. #10
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    'center' being the ID of the TabPanel right? Because nobody can SEE your code.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 16 Apr 2009, 4:48 AM
  2. borderLayout in a tab with autoScroll:true on tab
    By srajakaruna in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 29 Sep 2008, 12:57 AM
  3. Tab autoLoad update and autoScroll
    By nathanieljp in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 29 Jul 2008, 11:27 AM
  4. Replies: 7
    Last Post: 7 Feb 2008, 1:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •