Hello:
How can I show the empty row with the "*" the row heading (similar to Access)?
Venki
I would like to add the following questions to my initial posting above:
1. How do I have an Access-style phantom row at the bottom? I would rather not have the ADD button visible.
2. The Grid displays a dataset with the PK autoincrementing. When I add a new row (by clicking on the Add Row Button), it adds a new row prefilling the PK with the next value. How can I undo the row I added? If I try to delete the row, it says "Unable to update the row. First Name cannot be blank".
3. What does the ultragrid.Update() and UltraGrid.UpdateData() do? I tried executing these methods on my btnUpdate.Clicked event but they do not save the data. I had to use dsMine.Update() to commit the data.
Thanks.
Ok. I bumped into the solution for Item 1 and 2. By setting DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnBottom, I am getting the phantom row to show up at the bottom
But this creates another issue.
I am managing a table with an Autoincrementing PK. When I click on the phantom row, it automatically fills in the PK Value. If I move away from the row without typing anything or press escape, the adding of the new row is aborted. Just like the behavior in Access. Wonderful
But the next value of the PK never gets reset. For example, if my largest PK is 12, I click on the phantom row, the value of the PK on the new row is pre-filled with 13. But if I press escape and add a new row again, the PK value is set to 14. How can I reset it to 13?
Hi,
The key value comes from the data source, not from the grid. I don't think there's any way around this. The same thing happens if you call AddNew on the DataTable and then cancel it and call AddNew again.