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

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

3 Answers 61 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Luu
Top achievements
Rank 1
Luu asked on 03 Jan 2011, 11:47 AM
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





3 Answers, 1 is accepted

Sort by
0
Luu
Top achievements
Rank 1
answered on 18 Jan 2011, 09:56 AM
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.
0
Radoslav
Telerik team
answered on 21 Jan 2011, 09:37 AM
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.
0
Luu
Top achievements
Rank 1
answered on 21 Jan 2011, 10:03 AM
Thank for your answer .
Tags
Calendar
Asked by
Luu
Top achievements
Rank 1
Answers by
Luu
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or