Add rows programmatically

Hello

i havez a form with 2 tabs

When i choose a value from a dropdown, i want to autocomplete a grid in the other tab. I tried to use sfgrid.AddRecord(myObject) but it does not seem to work

When i add record in the grid with the add button, do not save and switch to the other tab, when i come back on the tag the grid is empty

Is it possible to add data programmatically in a grid that is not currently displayed ?


I am using 19.1.0.69


3 Replies

JP Jeevakanth Palaniappan Syncfusion Team November 11, 2021 02:26 PM UTC

Hi Mehdi, 

Greetings from Syncfusion support. 

Query: Is it possible to add data programmatically in a grid that is not currently displayed ? 
 
We would like to inform you that it is not possible to add record to the grid which is not rendered in the DOM. You can only add the data to the second grid’s datasource list. So when the grid is rendering, it will be rendered with the added data in the datasource object/list. This is the default behavior. 
 
Regards, 
Jeevakanth SP. 



ME Mehdi November 12, 2021 10:02 AM UTC

THank you for this quick reply



JP Jeevakanth Palaniappan Syncfusion Team November 16, 2021 05:21 AM UTC

Hi Mehdi, 

You are most welcome. Please get back to us if you have any other queries. 

Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon