Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2060
Update binding source while focus is in the cell
posted

Hi,

I've got multiple tabs on a tab control and each of those has an edtiable grid.  I'm forcing a save on the underlining collections when the user moves to another tab.

However the user maybe in a cell that they have changed when they chose another tab, without moving to another cell or row in that grid and thereby not forcing the bound class to update it's value.

All I'm looking for is a quick way of making the grid update the bound property in the class whilst still retaining the focus/cell selection, when the user moves to another tab.  Any thoughts?

Many thanks in advance.

Nathan

 

 

Parents
  • 48586
    Verified Answer
    posted

    Hello,

     

    You could handle an event like OnSelectedTabChanged, if you use UltraTabControl and write there following code lines:

                    ultraGrid1.PerformAction(UltraGridAction.ExitEditMode);

                    ultraGrid1.PerformAction(UltraGridAction.CommitRow);

     

    First line will force the Cell to exit edit mode and second will commit the changes.

     

    Let me know if you have any further questions.

Reply Children
No Data