I am working on a project that requires a pinned, editable row for updating the values of an entire column. I would like to just co-opt the AddRow for this purpose, since its distinction from the data source and unique appearance make it pretty well suited to such a task.
I would like to disable the intended functionality of the AddRow, since that capability is not needed by the application I'm working on. I had some success removing the mappings for the Enter and Tab keys - you couldn't add the row without those two keys, as far as I was able to tell. But, this means I need to handle the appropriate actions for those cells in the rest of the grid with my own code.
I'm wondering if you can suggest an alternative, such as identifying an event I could handle and cancel to prevent new rows from being added to the grid via the AddRow UI element. Thanks.
Hello,
I am not sure why would you want to take this road, you could set the 'AllowAddNew' to 'No', like this:
ultraGrid1.DisplayLayout.Bands[0].Override.AllowAddNew = AllowAddNew.No;
Please let me know if you feel that I misunderstood you.
Sorry for not making this more clear. I want to display the AddRow, I'm using the setting FixedAddRowOnTop to display it. I want to ignore its intended use of adding rows. Instead I want to use it for entering data which, after a user presses a button, will affect all the rows in the grid below the selected column.
The two triggers I'm aware of that cause a new row to be added from the AddRow's content are when a user presses enter or tabs out of the last cell of that row. I need to prevent these two actions and any others from triggering the row addition.
If it helps you to understand why I want to do this, here's a basic rundown of how I use this grid:
The AddRow being distinct in several ways from a regular row will make a lot of these tasks easier and more reliable, without having to constantly check the row index or key value.