1. #351
    Sencha User
    Join Date
    Jul 2010
    Posts
    6
    Vote Rating
    0
    ashkan is on a distinguished road

      0  

    Default

    hi all

    i am new on extjs . i have a problem on ext.direct for asp.net mvc 3

    here is my codes:

    thos is my model:
    Code:
    Ext.define('Crm.model.Storage', {
        extend: 'Ext.data.Model',
        idProperty: 'Id',
        fields: [
            { name: 'Id', type: 'int' },
            { name: 'CustomCode', type: 'string' },
            { name: 'Name', type: 'string' },
            { name: 'IsDefault', type: 'boolean' }
        ]
    });
    this is my store :

    Code:
    Ext.define('Crm.store.Storages', {
        extend: 'Ext.data.Store',
        model: 'Crm.model.Storage',
        pageSize: 10,
        autoLoad: true,
        autoSync: false,
        autoDestroy: true,
        proxy: {
            type: 'direct',
            //directFn: Storage.List,
            paramOrder: 'start|limit',
            api: {
                create: Storage.New,
                read: Storage.List,
                update: Storage.Update,
                destroy: Storage.DeleteStorage
            },
            reader: {
                type: 'json',
                root: 'data'
            },
            writer: {
                type: 'json',
                root: 'data',
                encode: true,
                writeAllFields: true
            }
        }
    });
    this is my app :
    [CODE]
    Ext.Loader.setConfig({
    enabled: true,
    paths: { 'Crm': '/app' }
    });


    Ext.require([
    'Crm.model.Storage',
    'Crm.store.Storages',
    'Crm.view.StorageGrid',
    'Crm.view.StorageForm',
    'Ext.ux.plugins.FitToParent'
    ]);


    Ext.direct.Manager.addProvider(Ext.app.REMOTING_API);


    Ext.application({
    name: 'Crm',


    models: ['Storage'],
    stores: ['Storages'],


    launch: function () {


    var newAction = Ext.create('Ext.Action', {
    text: 'انبار جدید',
    disabled: false,
    handler: function (widget, event) {
    var record = Ext.create('Crm.model.Storage');
    gridStorages.store.insert(0, record);
    }
    });


    var deleteAction = Ext.create('Ext.Action', {
    text: 'حذف انبار',
    disabled: true,
    handler: function (widget, event) {


    var sm = gridStorages.getSelectionModel();


    gridStorages.store.remove(sm.getSelection()[0]);


    gridStorages.store.sync();


    }
    });


    var formStorage = Ext.create('Crm.view.StorageForm', {
    columnWidth: 0.30,
    width: 350,
    height: 550
    });


    var gridStorages = Ext.create('Crm.view.StorageGrid', {
    columnWidth: 0.70,
    autoHeight: true,
    height: 550,
    tbar: ['-

  2. #352
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    125
    Vote Rating
    0
    JavascriptParrot is on a distinguished road

      0  

    Default

    Hello,

    Anybody know how to silence the unhandled exception popup in Visual Studio?

    Thanks

  3. #353
    Sencha User
    Join Date
    Feb 2012
    Location
    Davenport, IA
    Posts
    30
    Vote Rating
    6
    WillFM is on a distinguished road

      0  

    Default

    I searched through the thread a bit and didn't see anything posted about this.

    When I make a controller actions, with overloads, "directapi", won't make references to that controller.

    Why is that?

  4. #354
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    376
    Vote Rating
    20
    ttbgwt will become famous soon enough

      0  

    Default

    Does this work with Visual Studio 2012?

  5. #355
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    481
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default

    Quote Originally Posted by ttbgwt View Post
    Does this work with Visual Studio 2012?
    I don't see why it shouldn't.

  6. #356
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    376
    Vote Rating
    20
    ttbgwt will become famous soon enough

      0  

    Default

    Have you tested with MVC 4 yet?

  7. #357
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    481
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default

    Quote Originally Posted by ttbgwt View Post
    Have you tested with MVC 4 yet?
    Yes. It works fine.

  8. #358
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    376
    Vote Rating
    20
    ttbgwt will become famous soon enough

      0  

    Default

    I just downloaded Visual Studio 2012, and was able to run your test project no problems. It migrated with minor warnings

    Quote Originally Posted by elishnevsky View Post
    I don't see why it shouldn't.

  9. #359
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    376
    Vote Rating
    20
    ttbgwt will become famous soon enough

      0  

    Default

    Can you please compile a version with MVC 4 and post on your site?

    http://code.google.com/p/ext-direct-mvc/downloads/list

    Quote Originally Posted by elishnevsky View Post
    Yes. It works fine.

  10. #360
    Sencha User
    Join Date
    Jan 2008
    Location
    Toronto, Canada
    Posts
    481
    Vote Rating
    4
    elishnevsky is on a distinguished road

      0  

    Default

    Quote Originally Posted by ttbgwt View Post
    Can you please compile a version with MVC 4 and post on your site?

    http://code.google.com/p/ext-direct-mvc/downloads/list
    Here you are, try it:
    http://ext-direct-mvc.googlecode.com...t-mvc4-bin.zip

    Reference the Json.NET from the archive as well.