This is a migrated thread and some comments may be shown as answers.

How to dynamically add a grid control into a table

4 Answers 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rob Diamant
Top achievements
Rank 1
Rob Diamant asked on 05 Jan 2009, 10:28 PM
I have a table x rows by y columns and I want to be able to place a Grid into any (or none) of the cells, It is defined per user.

It seems that I can add a grid control as long as I do not allow paging. But if Paging is turned on, I get an error similar to this:
Control 'ctl08_ctl00_ctl03_ctl01_ctl02' of type 'Button' must be placed inside a form tag with runat=server.

Any suggestions?

Rob

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Jan 2009, 07:50 AM
Hello Rob,

According to the exception you do not have form tag - can you post a bit more info about your scenario?

Regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rob Diamant
Top achievements
Rank 1
answered on 06 Jan 2009, 02:26 PM
I am dynamically adding all my controls using VB. The objects are placed in the cells of an ASP table. So far I have no problem when adding a RadGrid without paging, but when it is turned on I get the error. Looking at my aspx code, I see the form tags. 

<body> 
    <form id="form1" runat="server">  
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
        </telerik:RadScriptManager> 
            <asp:Table ID="tblTable1" runat="server">  
            </asp:Table> 
    </form> 
</body> 
0
Sebastian
Telerik team
answered on 09 Jan 2009, 12:00 PM

Hello Rob,

Can you please verify that you are using the latest version 2008.3.1125 of RadControls for ASP.NET AJAX in your project? We have not been contacted with regards to a similar issue before and unfortunately I cannot say for certain what might be the exact reason for the error you receive when having paging enabled.

If the issue persists, please paste your ASPX and code-behind definitions in this support thread using the 'Format code block' dialog of the ticket editor. I will review them in detail and will advice you further.

Kind regards,

Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rob Diamant
Top achievements
Rank 1
answered on 06 Mar 2009, 03:59 AM
Solved the problem. I needed to add the controls to the Form1 control instead of the page.
Tags
Grid
Asked by
Rob Diamant
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Rob Diamant
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or