Results 1 to 3 of 3

Thread: Basic insert part into dashboard

  1. #1

    Default Answered: Basic insert part into dashboard

    I try to insert dynamic a new panel into dashboard.
    https://fiddle.sencha.com/#view/editor&fiddle/2jcu
    I must miss something but I do not see what.
    how I can modify the code ? Kind regards, christ

  2. I have to take drugs from time to time sorry for the disengagement

    Solution :

    Ext.application({
    name: 'Fiddle',


    launch: function () {
    Ext.define('MyApp.view.Dashboard', {
    extend: 'Ext.dashboard.Dashboard',
    alias: 'widget.mydashboard',
    title: 'Dashboard',
    stateful: true,
    bodyStyle: 'background:#4d7093; padding:5px;',
    maxColumns: 7,
    columnWidths: [0.25, 0.25, 0.25, 0.25],


    parts: {
    portlet1: {
    viewTemplate: {
    collapsible: false,
    closable: false,
    resizable: false,
    draggable: true,
    layout: 'fit',


    tools: [{
    type: 'gear',
    tooltip: 'Settings',
    handler: function () {
    Ext.Msg.alert('Settings', 'Modify widget settings.');
    }
    }]
    }
    }
    },


    defaultContent: [{
    type: 'portlet1',
    title: 'Panel 1',
    columnIndex: 0,
    height: 250,
    }]
    });
    var d = Ext.create('MyApp.view.Dashboard', {
    renderTo: Ext.getBody()
    });


    // It is work
    //d.addNew("portlet1");


    // It is work
    var part = d.getPart("portlet1");
    part.displayForm(null, null, function (config) {
    console.log("config",config);
    config.type = "portlet1";
    config.width=200;
    config.title="panel 3";
    d.addView(config);
    });


    // It is work
    var part = d.getPart("portlet1");
    d.addView({ type:"portlet1","width":200,"title":"panel 4"});
    }
    });

  3. #2

    Default

    For information, I read but it don't response of my answer :/ :
    https://www.sencha.com/forum/showthread.php?311845
    https://www.sencha.com/forum/showthread.php?314288
    https://www.sencha.com/forum/showthread.php?470309

    Quote Originally Posted by christophe.valmir.name View Post
    I try to insert dynamic a new panel into dashboard.
    https://fiddle.sencha.com/#view/editor&fiddle/2jcu
    I must miss something but I do not see what.
    how I can modify the code ? Kind regards, christ

  4. #3

    Default

    I have to take drugs from time to time sorry for the disengagement

    Solution :

    Ext.application({
    name: 'Fiddle',


    launch: function () {
    Ext.define('MyApp.view.Dashboard', {
    extend: 'Ext.dashboard.Dashboard',
    alias: 'widget.mydashboard',
    title: 'Dashboard',
    stateful: true,
    bodyStyle: 'background:#4d7093; padding:5px;',
    maxColumns: 7,
    columnWidths: [0.25, 0.25, 0.25, 0.25],


    parts: {
    portlet1: {
    viewTemplate: {
    collapsible: false,
    closable: false,
    resizable: false,
    draggable: true,
    layout: 'fit',


    tools: [{
    type: 'gear',
    tooltip: 'Settings',
    handler: function () {
    Ext.Msg.alert('Settings', 'Modify widget settings.');
    }
    }]
    }
    }
    },


    defaultContent: [{
    type: 'portlet1',
    title: 'Panel 1',
    columnIndex: 0,
    height: 250,
    }]
    });
    var d = Ext.create('MyApp.view.Dashboard', {
    renderTo: Ext.getBody()
    });


    // It is work
    //d.addNew("portlet1");


    // It is work
    var part = d.getPart("portlet1");
    part.displayForm(null, null, function (config) {
    console.log("config",config);
    config.type = "portlet1";
    config.width=200;
    config.title="panel 3";
    d.addView(config);
    });


    // It is work
    var part = d.getPart("portlet1");
    d.addView({ type:"portlet1","width":200,"title":"panel 4"});
    }
    });

Similar Threads

  1. gridpanel in dashboard part
    By zamkinos in forum Ext 5: Q&A
    Replies: 2
    Last Post: 20 Sep 2016, 7:19 AM
  2. Dashboard part vertical resize bug
    By moogjet in forum Ext 5: Bugs
    Replies: 2
    Last Post: 24 Sep 2014, 11:46 PM
  3. Dashboard part editing
    By moogjet in forum Ext 5: Q&A
    Replies: 5
    Last Post: 29 Jul 2014, 8:15 AM
  4. [DUP] 5.0.1 Dashboard Part Vertical Resize
    By moogjet in forum Ext 5: Bugs
    Replies: 3
    Last Post: 29 Jul 2014, 12:08 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
  •