Hello,
When using ListGrid.refreshData(), I'd like to pass clientContext, however refreshData doesn't take request properties the way fetchData does, so I'm not seeing a way to do this. I would usually put a reference to the grid in the clientContext so that I can take action on the grid in the callback of the fetch.
As a workaround, I saw the componentId property of dsRequest and see that I could use Canvas.getById() to retrieve a reference to the grid that way. However, the documentation recommends only using componentId for debugging purposes, so I wasn't sure if that was actually a good idea.
To summarize, is it safe to go ahead and use the componentId property of the dsRequest to get a reference to the grid in the refreshData callback? Or, do you have any other recommendations regarding passing context to the callback when using refreshData?
Thanks!
Philip
SmartClient Version: v12.0p_2018-08-11/LGPL
When using ListGrid.refreshData(), I'd like to pass clientContext, however refreshData doesn't take request properties the way fetchData does, so I'm not seeing a way to do this. I would usually put a reference to the grid in the clientContext so that I can take action on the grid in the callback of the fetch.
As a workaround, I saw the componentId property of dsRequest and see that I could use Canvas.getById() to retrieve a reference to the grid that way. However, the documentation recommends only using componentId for debugging purposes, so I wasn't sure if that was actually a good idea.
To summarize, is it safe to go ahead and use the componentId property of the dsRequest to get a reference to the grid in the refreshData callback? Or, do you have any other recommendations regarding passing context to the callback when using refreshData?
Thanks!
Philip
SmartClient Version: v12.0p_2018-08-11/LGPL
Comment