Apr 23, 2012, 4:42 PM
[CLOSED] TBar not renedering
Hey All,
Just a quick question, I'm dynamically creating a grid with a topbar but when I create it, it doesn't render, theres a space where it should be on the grid but no toolbar.
Thanks for looking
Just a quick question, I'm dynamically creating a grid with a topbar but when I create it, it doesn't render, theres a space where it should be on the grid but no toolbar.
var testArea = function(){
var tb = new Ext.Toolbar({items : [{text: "helloworld"}]});
var myData = new Ext.data.JsonWriter({"Data" : [{"MasterAccountId" : "6100" , "CreatedDate" : "18\/04\/2012 11:55:20", "UserId" : "181", "Username" : "Peter Gammon", "Note" : "Heloo"},{"MasterAccountId" : "6100" , "CreatedDate" : "18\/12\/2012 11:55:20", "UserId" : "181", "Username" : "Peter Jones", "Note" : "Goodbye"}]});
var store = new Ext.data.JsonStore({id : "noteStore", idProperty : "Id",data : myData, root : "Data", fields : [{name : "MasterAccountId"}, {name : "CreatedDate", type : "date", dateformat : "d-m-y H:m:s"}, {name : "UserId"}, {name : "Username"}, {name : "Note"}], data : myData });
var panel = new Ext.grid.GridPanel({id : "TestGrid", store: store,title: "Select Note", columns : [{ dataIndex : "CreatedDate", format : "d-m-y H:m:s", header : "Date Created", xtype : "datecolumn"}, { dataIndex : "Username", header: "Created By" },{ dataIndex : "UserId",hidden : true },{ dataIndex : "Note", header: "Notes", renderer : "limitValue"}], renderTo : "testJs", viewConfig : { forceFit: true }, height : 500, bbar: tb });
panel.doLayout();
}
Heres my code if anyone can see anything please let me know.Thanks for looking
Last edited by Daniil; Apr 24, 2012 at 10:32 AM.
Reason: [CLOSED]