Home Forums WinForms controls Xceed Grid for WinForms Cancelling the CurrentRowChanged Event?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #16292 |

    Is there a way to cancel the CurrentRowChanged event after its being fired? or Undo The CurrentRowChanged Event from inside the event handler. I couldn’t find 

    This is what I’m trying to do.

    I have a grid and based on the current row selected, I load a hand full of user controls with data. Now while these child controls are being loaded, I don’t want the grid to be able to change its current row ( as that would trigger the loading of the child controls with other info ). This wasn’t a problem when I was doing all the child control loading as a synchronous process, but due to the extensive load time some of these controls require, I need to do asynchronous loading of the child controls. 

    What I would like to do, if there was a way to check for the status of the Child Controls and if they are still loading their data, cancel the current row changing operation all together. Is that at all possible? Any ideas/suggestions are welcome.

     

     

    Imported from legacy forums. Posted by Nayeem (had 1339 views)

    User (Old forums)
    Member
    Post count: 23064

    You can prevent CurrentRow changes before you start processing and reset it to normal after your tasks:

    this.gridControl1.BeginInit();
    this.gridControl1.DataRowTemplate.CanBeCurrent = !this.gridControl1.DataRowTemplate.CanBeCurrent;
    this.gridControl1.EndInit();

     

     

    Imported from legacy forums. Posted by Vincent (had 847 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.