2 Replies Latest reply on May 5, 2009 9:16 AM by Flex harUI

    DataGrid with custom editor - forcing refresh?

    ethr

      I have a datagrid with DateField controls in several columns. The DateField appears when the field is in 'edit' mode and just shows the date text when its in 'render' mode. All well and good.

       

      Now I add two images next to the date control in edit mode. Clicking on them calls functions in the datagridcolumn 'column' to set specific values in the date field. The problem is that the 'get' function in the datagridcolumn editor isn't getting called after these values are set unless I go to another cell, then come back to this cell, then click again! In other words if I force the refresh.

       

      Im using 'destroyItemEditor' to close the datefield. I've tried a variety of methods to force the redraw / invalidate including updating the dataprovider, calling invalidate and even forcing the editor to display in another cell and then back again( even if this had worked it would have been unacceptable ).

       

      One interesting thing to note is that if I add an Alert.Show() before I call 'destroyitemeditor' the field gets updated properly but when the alert closes the editor reappears with the wrong date!

       

      Suggestions?