Jump to content

Recommended Posts

Posted

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);

 
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...