
I’ve found that you get the following JavaScript error when you have AutoGenerateColumns set to false and UseStaticHeaders set to true for a RadGrid:
Sys.InvalidOperationException: A control is already associated with the element.
I guess this is the result of telling the RadGrid to use static headers twice (in some form or another), but it was somewhat difficult to figure out what exactly was causing the JavaScript error (we found the answer by removing different attributes until we found the right one).
Here is the basic RadGrid definition (just for reference):
<telerik:RadGrid runat="server" AutoGenerateColumns="False"> |
<ClientSettings> |
<Scrolling UseStaticHeaders="True" /> |
</ClientSettings> |
. |
. |
. |
</telerik:RadGrid> |
6 Answers, 1 is accepted

I think your problem is probably somewhere else. We use AutoGenerateColumns="False" and UseStaticHeaders="True" on almost every single grid.
Scott

Scott,
You’re right – I checked again and realized that the problem was actually the result of having the UseStaticHeaders attribute set in the Skin definition for our RadGrid (this might just be something you’re not supposed to do).
Thanks,
- Zach

I tried to recreate the issue you depicted on the local version of this online demo as well as in several other tests but unfortunately to no avail. Can you please verify that you are using the latest version of RadGrid for ASP.NET AJAX (2008.1.619)? I will also appreciate if you paste the problematic grid definition along with the relevant code-behind logic in this forum post. Thus I will be able to advice you further.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

Thank you very much for the quick response (and sorry for my slow response here).
We just upgraded our Telerik installation to 2008.1.619 last week and we are still seeing this issue. One thing I have noticed and forgot to mention in my original post is that our grids work fine when they are put stand-alone on the page, but we see the JavaScript error when they are inside of a RadPageView. The hierarchy is as follows:
RadGrid
|_ User Control
|_ RadPageView
|_ RadMultiPage
|_ User Control
|_ Page
The code worked without any JavaScript errors when inside the following hierarchy:
RadGrid
|_ User Control
|_ Page
I'm sorry I'm not able to send you our code at this time, but if it helps solve this issue I'd be happy to try recreating it in a separate solution.
Thanks,
- Zach
Unfortunately, the provided information does not help us much in reproducing the error. I'm afraid we could not be of much help unless we reproduce the issue on our side. It will be best if you can open a support ticket and send us a simple running project (incl. your custom skin, CSS, images, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.
Greetings,
Paul
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center