andyhill Posted October 12, 2020 Posted October 12, 2020 I have created the following store at runtime, how do I assign this store to my grid ? UniSession.AddJS(grdUsers00.JSName + '.store = "Grid1Store"; '); does nothing ? MyScript:= 'var Grid1Store = new Ext.data.JsonStore( ' + '{ ' + ' root: "users", ' + ' fields: ["id", "name", "email"], ' + ' autoLoad: true, ' + ' data: ' + ' { ' + ' users: [ ' + ' { "id": 1, "name":"John Smith", "email":"jsmith@example.com"}, ' + ' { "id": 2, "name":"Anna Smith", "email":"asmith@example.com"}, ' + ' { "id": 3, "name":"Peter Smith", "email":"psmith@example.com"}, ' + ' { "id": 4, "name":"Tom Smith", "email":"tsmith@example.com"}, ' + ' { "id": 5, "name":"Andy Smith", "email":"asmith@example.com"}, ' + ' { "id": 6, "name":"Nick Smith", "email":"nsmith@example.com"} ' + ' ] ' + ' } ' + '}); '+ 'Grid1Store.load(); '; UniSession.AddJS(MyScript); Quote
Sherzod Posted October 13, 2020 Posted October 13, 2020 18 hours ago, andyhill said: how do I assign Hello, This post may help you: Quote
andyhill Posted October 13, 2020 Author Posted October 13, 2020 Sherzod, this creates a new grid in a panel, I want to use an already built grid and feed it json data - please advise. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.