Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
AddNew row with SortedColumns
posted

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.