StrataFrame Forum

UltraGrid AllowAddNew reset by Business Object

http://forum.strataframe.net/Topic17068.aspx

By Aaron Young - 6/14/2008

I have an UltraGrid bound to a BBS. The grid has DisplayLayout.Override.AllowAddNew = AllowAddNew.FixedAddRowOnBottom. When the form is run, this property is reset to AllowAddNew.No when my BO.FillAll() method is called in the ParentFormLoading event. The only code in BO.FillALL() is a FillDataTable with a select statement.

After the FillAll(), I set the property back to FixedAddRowOnBottom only for it to be reset back to No when a new record is added.

Is there something in the SF code which is doing this?

Thanks in advance,

Aaron

By Trent L. Taylor - 6/16/2008

Is there something in the SF code which is doing this?

Welcome to grid hell Smile  I ove the Infragistics grid...once it is working, but up until that point I generally like to swear at it a bit Smile

In this case the BBS should not be affecting this.  I am trying to think of what would even cause this to change.  There is some logic when implementing the IBindingList interface that determines how new records, etc. are dealt with and even supported.  But I cannot think of anything that would cause this to happen as this is a very common thing.  I know that we have done this ourselves and that a number of other SF developers would most than likely use this feature as well.  I never like to say "it 100% isn't the framework" as I generally get that stuffed up my nose...but it really should not be a factor. Smile

By Aaron Young - 6/16/2008

Hi Trent,

I have traced it and if I remove the FillDataTable call the grid property remains unchanged. If I add the FillDataTable call the property is changed by the time the call returns. Something is causing the property to reset and it is definately due to this call. I am using 2008 v2 so maybe there is a bug in the grid. However, I just tested this on the small application I sent you in another thread and it works. So something weird is going on here.

Regards,

Aaron

By Trent L. Taylor - 6/17/2008

Well, we use the Infragistics grid quite a bit within our medical app and I have not experienced or heard of any of the other developers mention anything like this.  However, we are running on .NET 2007 Vol. 3, so possibly there is an issue between the two versions.  You are welcome to post a sample and we can take a look at it.
By Aaron Young - 6/17/2008

Don't worry about this one for now. I have a form which works and many which don't so I will try and trace the difference.

Thanks,

Aaron

By Trent L. Taylor - 6/17/2008

Cool Cool