Welcome to the Xceed Community | Help
Community Search  

Cancelling the CurrentRowChanged Event?

Sort Posts: Previous Next
  •  07-21-2008, 5:00 PM Post no. 13661

    Cancelling the CurrentRowChanged Event?

    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.

     

     

  •  07-22-2008, 3:51 PM Post no. 13687 in reply to 13661

    Re: Cancelling the CurrentRowChanged Event?

    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();

     

     

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.