I cannot figure out how to get the UltraGrid to enable adding a row to the dataset. As to make sure that there was not something wrong with my custom objects I put together a test that has both the UltraGrid and the standard Microsoft DataGrid, which is allowing the add at the bottom.
If you want to get the TemplateAddRow to display in the UltraGrid, you need to set the grid.DisplayLayout.Override.AllowAddNew to TemplateOnTop or TemplateOnBottom. With that being said, however, there still seems to be some issues with your data source. I can't get the .NET DataGrid to work correctly with the AddNewRow either. The problem seems to be with your override of AddNewCore, mainly that you're never actually adding the new item to the list. I think that your best option here is to do what the base BindingList<T> class does and call the base implementation of the Add method with the object that you create:
protected override object AddNewCore(){ int cnt = this.Items.Count; ChoiceSetOption newObject = new ChoiceSetOption(cnt, "<Add Text>"); base.Add(newObject); return newObject;}
-Matt
Matt,
Thank you!
Sam