I am using the following DataSet Grid example:
The example allows me to upload a DataSet and then shows it into a grid.
I am trying to upload this DataSet through code to be loaded automatically on startup instead of doing it manually.
Is there a way to do do?
UPDATE:
My use case: I am willing to create a PCF component and use it on Dynamics CRM to generate a view for cases. I need the component to retrieve the cases from the CRM on startup so I can apply some logic on it and show it in the view. So far I can upload it manually and apply the logic.
I think you are talking about the PCF control harness scenario, debugging/testing the control with mock data. This is how it’s designed, to upload the mock data while testing. Read more
Once you upload the control in CRM, after entity/view configuration is done - then the control will render dynamic records from the CRM view based on existing filter criteria. The PCF component is just rendering a new UX/UI on top of existing data.