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
325
Setting Focus during RowUpdating event on the client side
posted

Environment  - Asp.NET
                           CLR 3.5 
                           Infragistics 2010 Vol 2 
                           VB.NET
                           WebDataGrid Version=10.2.20102.2101

During a client side RowUpdating validation I detect an error and would like to set focus to a specific cell.

For example in row 1, cell 10 I enter an invalid value. When I click in row 2, cell 5 the RowUpdating client side event fires. The error is detected and the update is cancelled.  The focus is now on row 2, cell 5.

I have the row in error in args.get_row().  I also know the cell where the invalid data was entered.

How can I set focus back on the cell where the error occured?

Thank you for your help...

Parents
No Data
Reply
  • 12679
    posted

    Hello,

    You have two options to use activation either selection behavior of the grid. Let suppose that the sender is the grid in the below code you could activate(set focus ) of particular cell like this:

        sender.get_behaviors()
                .get_activation()
                .set_activeCell('active cell object');

    Keep in mind that set_activeCell() method takes the Cell object from the grid as a parameter.

    Hope it helps you out.

Children