Jump to content

UniDBGrid.Pagingbar: Add Label, Later Change Label Text


andyhill

Recommended Posts

  grdWorkSheet.ClientEvents.UniEvents.Clear;
  MyScript:= 'pagingBar.afterCreate=function pagingBar.afterCreate(sender)'+
             '{ '+
             '  sender.add( '+
             '  [ '+

...

             '    { '+
             '      xtype: ''tbseparator'' '+
             '    }, '+

             '    { '+
             '      xtype: ''label'', '+
             '      id: "gridLabelid", '+
             '      text: ''abc'', '+
             '      margin: ''0 0 0 10'', '+
             '    }, '+

             '    { '+
             '      xtype: ''tbseparator'' '+
             '    }, '+

...

             '  ]); '+
             '} ';
  grdWorkSheet.ClientEvents.UniEvents.Add(MyScript);

Above my FormCreate code adds a Label to the Pagingbar and it displays as expected (please advise if I have added the Label correctly).

Elsewhere I want to change the Label.Text value at runtime

grdWorkSheet.JSInterface.JSCode(#1'.pagingBar.getComponent("gridLabelid").setValue(''Andy'');'); 

SetValue fails, please advise how to change the "gridLabelid" - thanks.

 

Link to comment
Share on other sites

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...