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.
HI RBonser,
I'm sorry to hear you're getting frustrated with our controls. We try to help our customers here, with our Developer Support, and samples.
Now, from your description, it sounds like something is wrong, but I cannot begin to know what without a sample. What version and build number are you using? If you don't have the latest Service Release, I'd suggest upgrading to the latest one. When you are doing an async postback, is it initiated by the grid or something else? What behavior? If you can get a working sample here, that would be much appreciated.
regards,
David Young
I just got done upgrading to the service pack that was just released today.
I'm not sure how I can get you a sample since my project is very intense and you will not have my data.
This is happening on two different partical postbacks, one caused by an Ajax Toolki Asyc Upload control and the other by the WebDataMenu Async postback. The grid has AJAX turned off (turning it on does not help) and is inside of an update panel
I upgraded to the latest service pack to fix the problem with WebDataMenu async postback causing the javascript error and it seems like every time I upgrade to fix one problem, it causes another.
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