I have been using infragistics controls (including the UltraGrid) in conjuntion with netTiers in my app for a while, with some success. The UltraGrid is bound to the strongly typed objects generated by the netTiers scripts.
I have just upgraded my netTiers scripts, so the code behind the strongly typed objects the grids are bound to have changed. Now when I click on the "empty" row at the bottom of the grid, nothing happens. Previously it would change to editable, and I could enter details into the grid. Now, it stays non editable.
Interestingly enough, blank records are inserted into the underlying database. They just arnt being displayed by the grid.
I realise this is not really a problem with Infragistics - it is more an issue of the behaviour of the objects I'm using changing. I'm just wondering if someone can suggest what sort of thing would change this behaviour - what sort of thing can I look for?
Thanks.
I am not familiar with the netTiers objects, but if you are seeing new rows added to the data source and they are not displaying in the grid, then it's probably an indication that the netTiers objects are not sending the grid a ListChanged notification for the AddNew row.
Have you tried this same thing using the DataGridView control in DotNet to see if you get the same (or similar) results?
Sometimes it helps to wrap your DataSource in a BindingSource before binding to the grid.
Thanks a lot Mike. That was enough to point me in the right direction.
It seems they (netTiers) are now deliberately supressing the OnListChanged event in the InsertItem method, as it was causing problems for people using WPF.
And I am using BindingSources - I'm binding the List of objects to the BindingSource.DataSource, then using the BindingSourceas the datasource for the grids.
I found the solution to this problem.
In the Listbase.cs file you just have to uncomment out the code that was suppressed by the latest build of nettiers (just like Fweeee had stated.
protected override void InsertItem(int index, T item) {
this.Items.Insert(index, item);
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index)); <----- This line was commented out, just remove the comments to fix.
}
Fweeee,
It looks like I am having the exact same problem you list in this post. I recently upgraded my nettiers and now all of my UltraGrids are broken. Do you have any advice on what you may have changed in your project(s) to make this work?
I have a huge project with over a 50 ultragrids bound to netTiers TLIST<>'s and none of them are allowing me to insert new rows into them.
Thanks,
Tim