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?
Hi all,
Let me know if anyone needs any additional help.
Regards,
Stefaniya
I have the exact same problem.
The thing is that my Band 0 rows work fine, with updates coming in the background, while the band1 rows have this problem. How is it that a cell in band 0 can stay in edit mode while the table receives updates, while a cell in band 1 cant? couldn;t the property that applies to band0 be applied to band1?
Could you suggest a simple solution for this problem that does not involve a design change? This is because I want to keep the user experience the same, regardless of the band of the data
I have posted a similar query here
http://community.infragistics.com/forums/p/43197/237461.aspx#237461
If focus is shifting to the first row in the grid, it's because the current position of the BindingManager is positioning to the first row of data and the grid is simply synchronizing the active row to the same row.
You can turn this function of the grid off using the SyncWithCurrencyManager property.
But I don't think that will solve the whole problem. If you are constantly updating the data and thus sending notifications to the grid that the data has change, then the grid will constantly be updating it's cell data and anything the user types in will be overwritten and the grid will constantly be forced out of edit mode.
I don't think what you are trying to do is possible - it's an inherent contradiction.
What you probably will have to do is give the user some other way to edit the data - outside of the grid in controls that are not databound.
Hi,
This only helps in activating the cell the user was editing. The problem is when the user is editing the cell and the refesh happens background, the user should still be able to continue editing the cell. Currently the partial value that user entered is replaced by the original value and the focus is lost :(
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.