Hello,
I have an UltraGrid that I am binding to a BindingSource, which is populated with a List<T> of objects. There is only one band in the grid (no child collections in the data source).
At run-time, I'm grouping the data by adding a column to the SortedColumns collection of the grid:
myGrid.DisplayLayout.Bands(0).SortedColumns.Add("ColumnToGroupBy", False, True)
I'd like to be able to display an "Add new" row at the bottom of the grid by setting the property:
myGrid.DisplayLayout.Bands(0).Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.FixedAddRowOnBottom
Unfortunately, this does not cause the "AddNew" row to appear on my grid.
I've also tried adding a new row at run-time:
myGrid.DisplayLayout.Bands(0).AddNew()
This raises an exception:
"Can't add a row to group-by rows collection"
My question: is there any way to display the "Add New" row to a grid that is grouped by one or more fields?
Any help would be greatly appreciated.
No. When the grid is grouped, I think there are some issues of context that prevent it from supporting AddNew. For example, if you had a TemplateAddRow under a parent GroupByRow, the grid would not know what to do with the field that is grouped.
I imagine these issues could be ironed out by requiring that you, the developer, fill in the required fields in some way. But the grid doesn't presently support this. You should Submit a feature request to Infragistics
When the grid is grouped, I think there are some issues of context that prevent it from supporting AddNew.
Is this still so? I have encountered this problem.
Kind regards
Thorsten Pontow
Mike,
Thanks very much for your response. I've submitted a feature request for this.
Cheers,
Eddie