I am getting an Object is not set to the instance of an Object error when my page does an async postback in Infragistics.Web.UI.GridControls.ContainerGrid.DataBind().
This is REALLLY frustrating me and I am begingging to REALLLLY HATE Infragistics controls, but until our contract is up and we can switch to Telerik (which is MUCH easier to work with), I am stuck with it.
That being said, I need to know how to stop this stupid error from happening. I can't contact IG because you have to pay mega extra to get help from them (yet another thing I hate).
My WHDG is source via WHDS which is sourced by an Object DataSource and and Entity DataSource.
Hello Robert,
Thank you for the clarification regarding the scenario.
I started creating a sample regarding this.
But I will need more details regarding the steps to reproduce:
1) Are you adding the row to the child band using the RowAdding or you are doing async postback and are adding new record to the row island the first parent row ( for example)
2) Do you use ClearDataSource method in the ContainerGrid before setting the new DataSouce?
3) Do you use load on demand functionality of the WHDG?
I know that sending an isolated sample will be complicating for you, but I will appreciate if you provide us with the markup of the grid and the code behind
Hope hearing from you.
Okay, I have narrowed this down to this.
On my postback, I am inserting a new record in the table that is the datasource for the Band records (child Grid, Row Islands, whatever you want to call them).
When I do this and I try to do a grid.rows.clear, I get the Object is not set to the instance of an Object error. If I take this out, then I do not get the error.
So, the question is how do I add a new row to the table and have the grid refresh with the appropriate data afterwards?
Further finding. It appears that if I do anything else during the postback, it causes this problem. However if the ONLY thing I do is the rows.clear it is fine.
This appears to be a timing issue.
When I put a break point on my rows.clear line, it is null. However, if I sit on the break point for several senconds, it will suddenly become not null and then continue fine.
Hi,
I feel your pain on the Phillies offense. That was a tough game to watch last night.
As for this, you can send the zip to me. my e-mail is dyoung at infragistics.com. If you can also attach what steps I should do to reproduce the problem, I will take a look today.
-Dave