I bind an ultraGrid to a DataTable via a DataAdapter.
And set the following options: grid.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.FixedAddRowOnTop grid.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect
The user is allowed to make as many changes/additions as they want before manually clicking 'Update'. (No auto update)
If the underlying table already contains rows I can add multiple rows to it by simply entering the first row and then moving focus to the existing rows part of the grid. This causes it to 'reset' the AddNewRow area ready for me to enter the next new row.
If the table is empty however I can only add 1 new row before I am forced to manually update the table.Until I perform the update I can't find any way to move that first row out of the 'AddNewRow' area so that I can add a second new row.
Is there any way to force the row to be moved when the 'existing rows' part of the grid does not exist?
ThanksMike
Hi Mike,
I answer almost the same question yesterday: AllowAddNew row disabled when datatable contains zero rows - Windows Forms - WinGrid
If those suggestions don't help, then could you possibly post a small sample project demonstrating the issue so I can check it out and find a solution?
The other link is related [much worse] but not the same.
I have no trouble entering data in the NewRow row. The problem is that after entering the data for first row I have no way to move it to the 'existing data' part of the grid so that I can enter the next new row. (Other than clicking Update)
My users are used to adding many rows at once so they dont want to have to press Update for the first row on its own, and then add the remaining rows before pressing Update again.
I am just checking the progress of this issue. Please let me know if your issue is resolved or if you need additional assistance.
Thank you for using Infragistics Components.
In our case the grid DataSource is a DataTable that is connected to the real data source through a DataAdapter.
We can perform an update after the user enters the data for the first row.(I provide an 'Update' button on the dialog. This calls UpdateData on the grid and then calls Update on the adapter.)
But the user normally works in batches of rows.They enter a bunch of rows and then press Update.They dont want to update each row individually as that is not good for performance.(So in our case Enter does not update the data source - they have to click Update.)
The database is a remote system - in my case it is over 2000 miles away and has to go over a 2 step VPN.Sending batches is therefore much more efficient.
Since the problem only applies to the first row in an empty table I guess its not a big deal but it would be nice if there were a way to move that new row out of the way like they can when there are other data rows.
Maybe the problem is that I am using the Enter key to put the user into Edit mode, or to take them out of Edit mode.(Instead of calling UpdateData)
I think I may have answered my own question.
Thanks
I will need some more information about your scenario. What do you mean that there is no auto update? IS it possible to post simple sample and exact steps that I should follow in order to reproduce this issue on my machine?
Generally the UltraGrid is programmed in a way that when you press enter, it will commit the row to the data source (if any changes have been made to the grid row), which means that the row will become normal DataRow and a new AddNewRow will appear. Additionally you can use this code to commit the row:
UltraGrid1.PerformAction(UltraGridAction.CommitRow)
Please let me know if this is what you are looking for.