Datagrid Problem
Posted: Tue May 11, 2010 11:50 pm
I have a general purpose function in my app that laods data into any datagrid based on various custom properties of the datagrid. 95% of the time it gets called from outside the datagrid itslelf and works just fine. The other 5% of the time it gets called from a script in the datagrid group and the datagrid gets corrupted (missing data, data displayed in wrong columns, etc). If I click the Refresh Datagrid button in it's property inspector, all looks OK again
I think I'm running into the issue about trying to redraw a datagrid from a handler within a datagrid, but not sure. If that is the issue, I'm unsure as to how to get round it. The handler in question is in a front script and loads data into the datagrid by setting the dgText property. I tried the send in zero seconds trick but that didn't fix the problem.
Any ideas?
Pete
PS Forgot to mention that the code is invoked from a popup menu associated with the datagrid when the user clicks the right mouse button and the code for that is in the rwo template behavior scrit I've associated with the datagrid.
I think I'm running into the issue about trying to redraw a datagrid from a handler within a datagrid, but not sure. If that is the issue, I'm unsure as to how to get round it. The handler in question is in a front script and loads data into the datagrid by setting the dgText property. I tried the send in zero seconds trick but that didn't fix the problem.
Any ideas?
Pete
PS Forgot to mention that the code is invoked from a popup menu associated with the datagrid when the user clicks the right mouse button and the code for that is in the rwo template behavior scrit I've associated with the datagrid.