1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
    jerald is on a distinguished road

      0  

    Default Unanswered: How to use different Store for a single table.?

    Unanswered: How to use different Store for a single table.?


    Hi,

    i have 16 columns in a table. But my design of the page is in panel it contain three tabs.
    one tab contain 4 columns, 2nd tab contain 5 columns and 3rd tab contain 7 columns.This 16 columns are in same table there not column also.

    before this i have created pages are base on form in single page that depends on only single table only,but this is different.

    Now creating desktop App.

    this desktop.js

    function Travel(src) {
    var desktop = myDesktopApp.desktop.app.getDesktop();
    var win = desktop.getWindow('Travel');
    if (!win) {
    win = desktop.createWindow({
    id : 'Travel',
    title : src.text,
    width : 640,
    height : 480,
    items : [
    Ext.create('Ext.grid.Panel', {
    border : false,
    id:'travelmaster_grid_id',
    store : travelStore,
    columns : travelColumns,
    tbar : travelbar,
    height : 450,
    viewConfig : {
    stripeRows : true,
    layout : 'fit'
    },
    bbar : Ext.create('Ext.PagingToolbar', {
    store : travelStore,
    displayInfo : true,
    displayMsg : 'Displaying {0} - {1} of {2}',
    emptyMsg : "No data to display"
    })
    }) ],

    iconCls : 'bogus',
    animCollapse : false,
    constrainHeader : true
    });
    }
    win.show();
    return win;
    };




    and the domain fields are define in Travel.js
    But in the above code i don't want columns i need tabs.
    What i need to do.?
    Please help me Out.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Answers
    3500
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    So you want a tabpanel with 4 grids as child items all using the same store? Not a problem as long as you are using the same dataset in the store. Each grid can show different columns.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
    jerald is on a distinguished road

      0  

    Default Three tabs

    Three tabs


    thanks for thereply mitchellsimoens ,

    Ext.create('Ext.grid.Panel', {
    border : false,
    id:'travelmaster_grid_id',
    store : travelStore,
    columns : travelColumns,
    tbar : travelbar


    here i'm using "column"

    i need to add a three tabs then what should i use.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Answers
    3500
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The grid does not support tabs, you would have to have multiple grids within a tab panel.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
    jerald is on a distinguished road

      0  

    Default I want to define tabPanel in different Js?

    I want to define tabPanel in different Js?


    Hi,

    ok thanks


    Ext.create('Ext.grid.Panel', {
    border : false,
    id:'travelmaster_grid_id',
    store : travelStore,
    columns : travelColumns,
    tbar : travelbar


    In Grid using columns i can define column in different js file i can refer. like above code.

    same like i need to define for tabPanel is it possible.?

Thread Participants: 1

Tags for this Thread