in the first databinding of gridview the error does not happen , but if I try a second databinding, for refresh the gridview,
the following error occurs:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.WinControls.Primitives.TextPrimitive.MeasureOverride(SizeF availableSize)
The code where the error occurs is the folowing:
The strange thing is in the "element.text" property, that if I not put the the tag "<html>"... the error does not happen, but, i need formating the field with a html code...
And the property "DisableHTMLRendering=false" is not working as it should, leaving the whole column unconfigured.
12 Answers, 1 is accepted
On which line is the error triggered?
there is no new response in the ticket system.
the property "DisableHTMLRendering=false" is not working as it should, leaving the whole column unconfigured.
The error occurs after leaving the CellFormating event, and only in the second databinding of the gridview.
but if, i not put the "<html>" tag in the element.Text, the error does not happen.
You can clean your gridview like this:
I'm binding my data in my code and not by datasource, so I'm not getting this error. I'm not sure how you are doing the databinding?
I clean the childs and the rows, but the error still happening.
I'm binding using the follow code:
but have also tested it with datasource...
so I compare with my code.
Thanks for your help.
You have opened two inquiries with the same question. Since support tickets get higher priority, we replied there first. The next day we noticed that you have the same question posted in the forums - this is why we replied to look into your support question.
We would also prefer to continue addressing this question in just one thread - this will make sure that we have all information in one place, rather than jumping back and forth between different threads. This will make us respond faster and more accurately.
Thank you for your understanding. We will reply in this thread shortly.
the Telerik team
Well I've got an List<Object> (where Object is a collecion of getters and setters) that I'm filling up first.
(because I need data from more than one table )
After that I'm looping my List<Object> and set my griddata like described in the helpfiles of the RadGridView
Here is an example of how I do it.
Where my 2 objects are written like this:
It's possible that I have typo's in the example code. I wrote it quickly in notepad. But I think you will get the idea.
You can find the answer to your question about the HTML rendering in your support ticket.
gerbrand, thank you for your community efforts. I have updated your Telerik points.
the Telerik team