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

[Solved] Script controls may not be registered after PreRender

5 Answers 258 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Malibongwe
Top achievements
Rank 1
Malibongwe asked on 08 Jan 2010, 01:17 PM
I have received the above error from the Telerik data grid. The grid is bound to an LLBLGenDataSource control that returns an entity collection. However the data from this data source has a select parameter using a RadComboBox control. I need this as it reduces the amount of data I can view at any one time.

The problem arises when I enable this select parameters and set the grid to support paging. If I turn off the paging, the problem goes away, however I am left with a long result set. If on the other hand I comment out these select parameters, I am able to use paging but the number of pages increases. 

I am using ajax by the way.

Can you guys help me?

5 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 11 Jan 2010, 11:35 AM
Hello Malibongwe,

Could you paste your aspx and code-behind (please, use the code formatter tool of the ticket editor).

Thanks.

Greetings,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Malibongwe
Top achievements
Rank 1
answered on 11 Jan 2010, 03:06 PM
<llblgenpro:llblgenprodatasource2 id="SystemObjectTypeCollectionDataSource" runat="server"  
    cachelocation="Session" datacontainertype="EntityCollection" enablepaging="True"  
    AdapterTypeName="Data.OnsightManager.DatabaseSpecific.OnsightDataAccessAdapter, Data.OnsightManagerDBSpecific"  
    EntityFactoryTypeName="Data.OnsightManager.FactoryClasses.SystemObjectTypeEntityFactory, Data.OnsightManager"
</llblgenpro:llblgenprodatasource2> 
 
<llblgenpro:llblgenprodatasource2 id="SystemObjectCollectionDataSource" runat="server"  
    cachelocation="Session" datacontainertype="EntityCollection" enablepaging="True"   
    AdapterTypeName="Data.OnsightManager.DatabaseSpecific.OnsightDataAccessAdapter, Data.OnsightManagerDBSpecific"  
    EntityFactoryTypeName="Data.OnsightManager.FactoryClasses.SystemObjectEntityFactory, Data.OnsightManager"
        <SelectParameters> 
            <asp:ControlParameter ControlID="cboSystemObjectType" PropertyName="SelectedValue" Name="SystemObjectTypeId" /> 
        </SelectParameters> 
</llblgenpro:llblgenprodatasource2> 
 
 
<telerik:RadAjaxPanel id="radAjaxPanel" runat="server" loadingpanelid="ajaxLoadingPanel" > 
 
 
    <div> 
        <span>System Object Type:</span> 
        <span>&nbsp; &nbsp; </span> 
        <span> 
             <telerik:RadComboBox ID="cboSystemObjectType" runat="server" DataSourceID="SystemObjectTypeCollectionDataSource"  
                   OnSelectedIndexChanged="cboSystemObjectType_SelectedIndexChanged"  
                    DataTextField="Name" DataValueField="SystemObjectTypeId" AutoPostBack="true" > 
             </telerik:RadComboBox> 
        </span> 
    </div> 
 <div> 
     
        <telerik:RadGrid ID="SystemObjectGrid" runat="server" DataSourceID="SystemObjectCollectionDataSource" 
            AutoGenerateColumns="false" AllowPaging="true" ClientSettings-Selecting-AllowRowSelect="true" ClientSettings-EnablePostBackOnRowClick="true"  > 
                <MasterTableView DataKeyNames="SystemObjectId" > 
                    <Columns> 
                        <telerik:GridTemplateColumn> 
                            <ItemTemplate> 
                                <asp:Label ID="lblSystemObject" runat="server" Text='<%# GetSystemObjectName((Guid)Eval("SystemObjectId")) %>' ></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn>                     
                    </Columns> 
                </MasterTableView> 
        </telerik:RadGrid> 
    </div> 
</telerik:RadAjaxPanel> 

0
Tsvetoslav
Telerik team
answered on 13 Jan 2010, 01:00 PM
Hello Malibongwe,

Sorry to remind you - could you paste also the code-behind for the mark-up you provided.

Thank you.

Greetings,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Malibongwe
Top achievements
Rank 1
answered on 18 Jan 2010, 12:03 PM


using
 System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Data; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using Common.OnsightManager; 
using Data.OnsightManager.EntityClasses; 
using Data.OnsightManager.HelperClasses; 
using Utilities.OnsightManager; 
using Model.OnsightManager; 
using SD.LLBLGen.Pro.ORMSupportClasses; 
using Telerik.Web.UI; 
 
namespace Vision.OnsightManager.UI.UserControls.Admin.ACL 
    public partial class ucACLSystemObject : UserControlBase 
    { 
 
        protected override void OnInit(EventArgs e) 
        { 
            base.OnInit(e); 
        } 
        protected override void OnPreRender(EventArgs e) 
        { 
            base.OnPreRender(e); 
        } 
       
        protected void Page_Load(object sender, EventArgs e) 
        { 
            
        } 
        protected void cboSystemObjectType_SelectedIndexChanged(object o,   Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) 
        { 
            BindData(); 
        } 
 
 private void BindData() 
        { 
            string strSelectedObjectType = cboSystemObjectType.SelectedValue; 
 
            Guid selectedObjectType = new Guid(strSelectedObjectType); 
            IRelationPredicateBucket bucket = new RelationPredicateBucket(); 
            bucket.PredicateExpression.Add(SystemObjectFields.SystemObjectTypeId == selectedObjectType); 
 
            SystemObjectCollectionDataSource.FilterToUse = bucket; 
 
        } 
0
Tsvetoslav
Telerik team
answered on 20 Jan 2010, 02:56 PM
Hi Malibongwe,

Thanks for pasting the code - I could not spot anything wrong with it, however, it uses a lot of custom assemblies and even a custom user control base class (I suppose you are not using SiteFinity). Therefore, I'd ask you to open up  a formal support ticket and send a small test project where the issue is reproduced. We shall debug it and get back to you with more information.

Thanks in advance.

Regards,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Malibongwe
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Malibongwe
Top achievements
Rank 1
Share this question
or