Results 1 to 2 of 2

Thread: How to add store for eventStore in Ext Scheduler in Sencha Architect

  1. #1
    Sencha User
    Join Date
    Apr 2014
    Posts
    19
    Vote Rating
    0
      0  

    Default How to add store for eventStore in Ext Scheduler in Sencha Architect

    I have created model for the store which is overridden to use
    "extend: 'Sch.model.Event'"

    Code:
    Ext.define('MyApp.model.Event', {
        extend: 'Ext.data.Model',
    
        requires: [
            'MyApp.model.override.Event'
        ],
    
        fields: [
            {
                name: 'Id',
                type: 'string'
            },
            {
                name: 'Name',
                type: 'string'
            },
            {
                dateFormat: 'Y-m-d H:i',
                name: 'StartDate',
                type: 'date'
            },
            {
                dateFormat: 'Y-m-d H:i',
                name: 'EndDate',
                type: 'date'
            },
            {
                name: 'ResourceId',
                type: 'string'
            }
        ]
    });
    
    Ext.define('MyApp.model.override.Event', {
        override: 'MyApp.model.Event',
        extend: 'Sch.model.Event'
        
    });
    i have used above model in store
    Code:
    Ext.define('MyApp.store.eventStore', {
        extend: 'Ext.data.Store',
    
        requires: [
            'MyApp.model.Event'
        ],
    
        constructor: function(cfg) {
            var me = this;
            cfg = cfg || {};
            me.callParent([Ext.apply({
                autoLoad: true,
                model: 'MyApp.model.Event',
                storeId: 'eventStore',
                data: [
                    {
                        Id: 'e1',
                        ResourceId: 'location1',
                        Name: 'Event 1',
                        StartDate: '2014-04-21 09:00',
                        EndDate: '2014-04-21 11:00'
                    },
                    
                ],
                proxy: {
                    type: 'ajax',
                    reader: {
                        type: 'json'
                    }
                }
            }, cfg)]);
        }
    });
    i have assigned store to eventStore
    Code:
    eventStore : MyApp.store.eventStore
    events are not displaying in the Scheduler Grid. Where i am going wrong?
    I am new to sencha architect. Please help me.

  2. #2
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,142
    Vote Rating
    190
      0  

    Default

    Better to ask Scheduler questions in the Bryntum forums. www.bryntum.com/forum

Tags for this Thread

Posting Permissions

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