1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Vote Rating
    0
    Prashant0104 is on a distinguished road

      0  

    Default Unanswered: how to add data dynamically to store

    Unanswered: how to add data dynamically to store


    Hi,
    i have a problem in adding data dynamically to store, i use the following code

    name.set('status', 'Offline');

    this codeis work fine but when i add split button on grid then it give following error
    • Uncaught TypeError: Cannot call method 'hasCls' of null
    • Uncaught TypeError: Cannot read property 'dom' of null
    i use the following code to add split button in grid

    Code:
        {
                            
                            width : 100,
                            renderer : function(view, meta, record) {
                                var id = Ext.id();
                                Ext.defer(function() {
                                    Ext.widget('button', {
                                        renderTo : id,
                                        text : 'Action',
                                        menu : Ext.menu.Menu({
                                            items : [
                                                     {
                                                xtype : 'menuitem',
                                                text : 'Edit'
                                                
                                                
                                            },
                                            {
                                                xtype : 'menuitem',
                                                text : 'delete'
                                                
                                                
                                            }]
                                        })
                                    });
                                }, 50);
    
    
                                return Ext.String.format('<div id="{0}"></div>', id);
                            }
                        }
    please help me.
    Last edited by skirtle; 1 Oct 2012 at 2:43 AM. Reason: Reformat

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    109
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    It's maybe because creation of split button happens before grid cells are rendered. You should check to make sure the element you want to render button into has existed.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar