Jump to content

NestedList : problem adding items ar runtime


Marco Pavan

Recommended Posts

Hi,

-----

Var
 NewNode:TUniTreeNode;
begin
 NewNode:=UnimNestedList1.Items.Add(nil,'some text');
  NewNode.Text:='new text';   // AJAX EXCEPTION

------

this simple code always raise an Ajax exception " _snatr_ is not defined"  (see attached)
How can I add dynamically items to a UnimNestedeList?

PS: UniGui Mobile 1.90

Help!!!!

 Marco

Schermata 2020-06-18 alle 10.53.32.jpg

Link to comment
Share on other sites

1 hour ago, Marco Pavan said:

this simple code always raise an Ajax exception " _snatr_ is not defined"  (see attached)
How can I add dynamically items to a UnimNestedeList?

Hi,

Can you please open a ticket in the support portal?

Workaround:

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  UniSession.AddJS('_snatr_ = function(b,c,a,e){var d=b.getStore().getNodeById(c);if(d){d.set(a,e);d.commit()}}');
end;

 

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...