Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #101204
    LC
    Member

    Hello!
    At present, I have encountered some problems when using the grid component. I hope you can help me.
    At present, I use the grid component as a child component, and there is bidirectional data binding between the grid component and the parent component. The development environment is Angular. Now I can successfully display the data from the parent component in the child component-the grid through @ input. The problem is how to transfer the edited content in the grid to the parent component by @ output or in some other ways? I have read some documents, but I have no idea at present.
    In other words, after editing the data in the grid component of the web page, how to obtain the data changed on the original data?
    looking forward to your early reply. thank you.
    BR,
    LC

    #101205
    admin
    Keymaster

    Hi LC,
    You can use the grid.dataSource property to get the Grid’s data source with the edits made by the end-user or through API. You can use it in order to update your parent component.
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

    #101208
    LC
    Member

    Hi Peter,
    Thank you very much for your reply. We can see from the API that grid.dataSource is a DataAdapter type. So the question is how to convert this type to array? It would be great if there were relevant examples.
    Thank you very much for your help.
    BR,
    LC

    #101209
    admin
    Keymaster

    Hi,
    You can access the datasource members by index and there is also a length property i.e quite easy an artay can be retrieved by just looping through the datasource with for i = 0 to datasource.length.
    Regards,
    Peter

    #101210
    LC
    Member

    Hi,
    Thank you very much. Your reply was very helpful.
    BR,
    LC

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.