How to get TelerikControl with full Script and Skin use jQuery PostMessage

4 posts, 0 answers
  1. Luu
    Luu avatar
    3 posts
    Member since:
    Jan 2011

    Posted 03 Jan 2011 Link to this post

    I want to do :
    ===========================================================================
    I make a page , in this sample : Default.aspx 
    ===========================================================================
    function getGData(){
            var that = this;
            //debugger;
             var url = "GetDateTimePicker.aspx";
                // The request size requires a post
             $.post(url, function (html) {
                 debugger;
                 $('#DateTimeContainer').html(html);
             });
            }
    ==========================================================================
    When click GetDataHTMLButton (Default.aspx), I call getGData() to fetch HTLM return by GetDateTimePicker.aspx 
    and fetch result to DateTimeContainer(Default.aspx)
    Code for GetDateTimePicker.aspx 
    ===========================================================================
    protected override void OnPreRenderComplete(EventArgs e)
            {
                base.OnPreRenderComplete(e);
                Context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
                Context.Response.Cache.SetCacheability(HttpCacheability.Public);
                string returnString = ConvertControlToHtml(tekDateTimePicker);//GridTest this.gridResults
                Context.Response.Write(returnString);
                Context.Response.End();


            }
            protected override void OnPreRender(EventArgs e)
            {
                base.OnPreRender(e);
                if (!this.tekDateTimePicker.RegisterWithScriptManager)
                {
                    ScriptManager scrip = this.Page.FindControl("ScriptManager") as ScriptManager;
                }


            }
            protected override void Render(HtmlTextWriter writer)
            {
                base.Render(writer);
            }
            public string ConvertControlToHtml(Control selectedControl)
            {
                StringBuilder sb = new StringBuilder();
                using (StringWriter sw = new StringWriter(sb))
                {
                    using (HtmlTextWriter textWriter = new HtmlTextWriter(sw))
                    {
                        try
                        {
                            selectedControl.RenderControl(textWriter);
                        }
                        catch (Exception e)
                        {
                            System.Console.Write(e);
                        }
                    }
                }
                 return sb.ToString();
            }
    ===========================================================================
    But the result not include CSS and Script with event for the buttons.
    Please download this file  MyTestSolution  (Sorry I can't attact my File)

    I'm using "Telerik.Web.UI" vesion "2009.3.1103.35"

    Thanks
    ThangLuu - Bamboo





  2. Luu
    Luu avatar
    3 posts
    Member since:
    Jan 2011

    Posted 18 Jan 2011 Link to this post

    along time for waiting ,
    What happen with my question? Why don't have any answer for me?
    I hope there is a solution for me. Please answer either yes or no.
  3. Radoslav
    Admin
    Radoslav avatar
    1566 posts

    Posted 21 Jan 2011 Link to this post

    Hi Luu,

    Unfortunately the RadControls for ASP.NET AJAX does not support the desired functionality concerning getting them through Post Message. However you could check out our controls for ASP.NET MVC which extend the ASP.NET MVC framework by delivering a server-based framework that integrates with client-side modules based on popular JavaScript library, jQuery.

    I hope this helps.

    Regards,
    Radoslav
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  4. Luu
    Luu avatar
    3 posts
    Member since:
    Jan 2011

    Posted 21 Jan 2011 Link to this post

    Thank for your answer .
Back to Top