WebformsMVP

5 posts, 0 answers
  1. Adam Lindsay
    Adam Lindsay avatar
    21 posts
    Member since:
    Oct 2009

    Posted 08 Sep 2010 Link to this post

    Do you have an example of Telerik controls with WebformsMVP ?
  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 09 Sep 2010 Link to this post

    Hi Adam,

    You may check this code library, which illustrates a possible implementation of RadGrid and WebFormsMVP framework.

    Kind regards,
    Rosen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Adam Lindsay
    Adam Lindsay avatar
    21 posts
    Member since:
    Oct 2009

    Posted 09 Sep 2010 Link to this post

    I downloaded the app. It is not working. It is unable to load the entities.

    Anyway, I am working on a new project with Telerik controls using WebformsMVP. I am getting below error.  Any idea how to fix this.


    RegisterRequiresControlState can only be called before and during PreRender.


     

     

    [InvalidOperationException: RegisterRequiresControlState can only be called before and during PreRender.]
       System.Web.UI.Page.RegisterRequiresControlState(Control control) +2766830
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +8901268
       System.Web.UI.ControlCollection.Add(Control child) +79
       Telerik.Web.UI.RadGrid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +361
       System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +66
       System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +128
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
       Telerik.Web.UI.RadGrid.DataBind() +89
       System.Web.UI.Control.DataBindChildren() +201
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
       System.Web.UI.Control.DataBind() +15
       System.Web.UI.Control.DataBindChildren() +201
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
       System.Web.UI.Control.DataBind() +15
       System.Web.UI.Control.DataBindChildren() +201
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
       System.Web.UI.Control.DataBind() +15
       System.Web.UI.Control.DataBindChildren() +201
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
       System.Web.UI.Control.DataBind() +15
       System.Web.UI.Control.DataBindChildren() +201
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
       System.Web.UI.Control.DataBind() +15
       System.Web.UI.Control.DataBindChildren() +201
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
       System.Web.UI.Control.DataBind() +15
       System.Web.UI.Control.DataBindChildren() +201
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
       System.Web.UI.Control.DataBind() +15
       System.Web.UI.Control.DataBindChildren() +201
       System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
       System.Web.UI.Control.DataBind() +15
       WebFormsMvp.Web.<>c__DisplayClassa`1.<Register>b__9(Object sender, EventArgs e) +39
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +8872106
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2716

     

  5. Adam Lindsay
    Adam Lindsay avatar
    21 posts
    Member since:
    Oct 2009

    Posted 09 Sep 2010 Link to this post

    It is working if I remove client events. Any idea how to fix this ?

     

     

     

    <ClientEvents OnGridCreated="rgEHProcessing_Created" OnRowDblClick="rgEHProcessing_RowDblClick"

     

     

     

    OnCommand="rgEHProcessing_Command" />

     

  6. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 10 Sep 2010 Link to this post

    Hi Adam,

    I suspect that the cause for the error you are getting is the way MvpUserControl is implemented. As you may know the class exposes an AutoDataBind property, which by default will cause a call to DataBind on PreRenderComplete event. However, this will eventually recreate all databound controls too late in the page's lifecycle. Therefore, could you set AutoDataBind property to false (inside UserControl's constructor) and see if this makes any difference in the observed behavior.

    Best wishes,
    Rosen
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017