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
125
Removing the default row selection in ultragrid
posted

Hi

I have an ultragrid on a form with multiple bands displayed hierarchically.The data being displayed in the grid gets updated on a real time basis from a server.

We need to provide a feature on the grid, where the user can edit a specific column's cell values while the grid gets refreshed on the real time.

The problem here is when the cell in the band 1 of the grid is in editmode, we receive data from the server and the underlying datatable gets changed. And then the first row is selected by default.

This will move the focus out of the cell that the user is amending.

To remove the default row selection i have set the folowing property :

grid.DisplayLayout.Override.SelectTypeRow =

SelectType.None;

I then used the following code in the InitialiseRow and it stopped the default selection.

gridStrategies.ActiveRow = e.Row;

gridStrategies.ActiveRow =

null;

 But it did not solve the problem, When the activerow is being set, the focus is lost from the cell that the user is updating.

The problem is with the default selection of the first row. Can you please help with this?

Parents
No Data
Reply
  • 4219
    Suggested Answer
    posted

    Hi,

     

    I could suggest you to use the AfterCellActivate event of the grid to save the index of currently activated row and the column of the cell, and the InitializeLayout event to set the active cell of the grid.

    Let me know if this works in your scenario.

     

    Regards,

    Stefaniya

Children