Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
394 views

Hey folks.

For you guys struggling with one of the following errors (or both if you try to render a new ScriptManager)
 
 - Only one instance of a ScriptManager can be added to the page.
 - The control with ID 'xx' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

The solution is to make sure that the ScriptManager is rendered BEFORE the given RAD Control, and that only one ScriptManager exists. The following code snippet should achive this:

protected override void CreateChildControls()
{
     if (ScriptManager.GetCurrent(this.Page) != null)
     {

          this.sm = ScriptManager.GetCurrent(this.Page);
     }
     else
     {
          this.sm = new ScriptManager();
          this.Controls.Add(this.sm);
     }
}

Now make sure the ScriptManager is rendered BEFORE the controls needing it (ie RadEditor)

protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
     this.sm.RenderControl(writer);
     this.radEditor.RenderControl(writer);
}

Hopefully this will be helpful to someone else.

Jimmy
Top achievements
Rank 1
 answered on 30 Mar 2009
1 answer
95 views
I seem to have run into an issue that I don't seem to be able to resolve (without some nice javascript). I am using the 2008.03.1105.35 release of the asp.net ajax controls and seem to have the following issue with the rad ajax manager.

The aspx
<div style="margin-left:50px; margin-top:50px;"> 
    <ul style="list-style-type:none; line-height:50px;"> 
        <li> 
            <telerik:RadComboBox ID="rcbSelection" runat="server" AutoPostBack="true"> 
                <Items> 
                    <telerik:RadComboBoxItem Text="Show Button" Value="sb" /> 
                    <telerik:RadComboBoxItem Text="Hide Button" Value="hb" /> 
                </Items> 
            </telerik:RadComboBox> 
        </li> 
        <li> 
            <asp:Label ID="lblButtonStatus" runat="server" Text="The Button that should post back is now visible." /> 
        </li> 
        <li> 
            <div style="width:500px; overflow:auto; border: solid 1px black;"> 
                <asp:Label ID="lblChangingText" runat="server" Text="This Text should Change" /> 
            </div> 
        </li> 
        <li> 
            <div> 
                <asp:Button ID="btnPostBackButton" runat="server" Text="Post Back Button" /> 
                <asp:Button ID="btnShouldDoAFullPostBack" runat="server" Text="Should Do A Full PostBack" /> 
            </div> 
        </li> 
    </ul> 
</div> 
         
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="rcbSelection" EventName="SelectedIndexChanged"> 
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="lblButtonStatus" /> 
                <telerik:AjaxUpdatedControl ControlID="btnShouldDoAFullPostBack" /> 
                <telerik:AjaxUpdatedControl ControlID="lblChangingText" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 

The code behind

protected void Page_Load(object sender, EventArgs e) 
{ 
 
} 
 
protected override void OnInit(EventArgs e) 
{ 
    base.OnInit(e); 
 
    this.rcbSelection.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(rcbSelection_SelectedIndexChanged); 
 
    this.btnShouldDoAFullPostBack.Click += new EventHandler(btnShouldDoAFullPostBack_Click); 
    this.btnPostBackButton.Click += new EventHandler(btnPostBackButton_Click); 
} 
 
void rcbSelection_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
{ 
    switch(e.Value.ToString().ToLower()) 
    { 
        case "sb": 
            lblButtonStatus.Text = "The Button that should post back is now visible."; 
            btnShouldDoAFullPostBack.Visible = true; 
            break; 
 
        case "hb": 
            lblButtonStatus.Text = "The Button that should post back is no longer visible."; 
            btnShouldDoAFullPostBack.Visible = false; 
            break; 
    } 
} 
 
void btnPostBackButton_Click(object sender, EventArgs e) 
{ 
    lblChangingText.Text = "You did a correct, full post back"; 
    lblChangingText.ForeColor = System.Drawing.Color.Black; 
} 
 
void btnShouldDoAFullPostBack_Click(object sender, EventArgs e) 
{ 
    lblChangingText.Text = "btnPostBackButton did an ajax request when clicked. It should have done a full post back. If you are seeing this then you've selected the drop down list after you pressed btnNonPostBack - which updates lblChangingText."; 
    lblChangingText.ForeColor = System.Drawing.Color.Red; 
} 

When using the code above, if I click button btnShouldDoAFullPostBack then as far as the user is concerned nothing happens. What actually happens is that the button does a postback - but is encompassed within the radajax manager, meaning that it becomes an ajax "type" request.

I say ajax "type" request, because if you add a client event for the "OnRequestStart" event, the dropdownlist item will fire the "OnRequestStart" event, but the btnShouldDoAFullPostBack.Click event does not fire the "OnRequestStart", meaning that you cannot intercept the event and then force a postback.

I was pointed in the direction of this link http://www.telerik.com/help/aspnet-ajax/ajxexclude.html by one of my collegues, but unfortunately none of the suggested work arounds seem to fix the problem.

Help!?
Iana Tsolova
Telerik team
 answered on 30 Mar 2009
4 answers
111 views
Hello,

If I put a RadEditor into a Tooltip, the editor toolbar has no effect : Bold etc...

This is my code :
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server"/>  
    <div> 
        <asp:Image ID="img_Intro" runat="server" ImageUrl="" style="vertical-align:middle;cursor:pointer;" /> 
       <telerik:RadToolTip ID="RadToolTip1" runat="server" RelativeTo="Element" TargetControlID="img_Intro" 
         ManualClose="true" Skin="Telerik">  
            <div style="padding:5px;">  
                 <telerik:radeditor ID="RadEditor1" runat="server" Skin="Vista" ToolsFile="~/BasicTools.xml" Height="150px" EditModes="All" NewLineBr="false" /> 
            </div> 
        </telerik:RadToolTip> 
        </div> 
    </form> 
 

I'm using 2008 Q3.
Do you see the same problem ?

Thank you for help.
Luc.
Rumen
Telerik team
 answered on 30 Mar 2009
1 answer
139 views
Hi,
I am displaying on of my user control as a popup in RadToolTipManager. I have close button to close the RadToolTipManager from javascript. I am calling one java script function to hide the RadToolTipManager.

<

asp:Button ID="btnClose" CssClass="cmb_btnG" Text="<%$ CmbResources:eBAM,LEList_btnClose %>"

 

 

runat="server" OnClientClick="HideToolTip();" />

 



function

HideToolTip()

 

{

 

var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();

 

 

 

if (tooltip)

 

{

tooltip.hide();

}

}



When I am clicking on the Close button it is also executing OnAjaxUpdate method of code behind.
I don't want to call OnAjaxUpdate method on click of my close button.

 

Svetlina Anati
Telerik team
 answered on 30 Mar 2009
2 answers
135 views
Hi,
My company is trying to use radcontrols trial Q1 2009.
Since we use radcombobox as to be seem like textbox ( like exactly the search box in http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/textwithicons/defaultcs.aspx), we couldn't successfuly dissappear toggle image ( the down image that opens radcombo)

I guess ShowToggleImage can hide this image..
More clear screenshot is : http://img31.imagevenue.com/img.php?image=48143_ShowToggleImage_fault_122_650lo.JPG

If anyone knows how to do that pls explain me

best regards
r00tsecurity
Top achievements
Rank 1
 answered on 30 Mar 2009
1 answer
143 views
Hi,

I want to create Tab Strip dynamically in asp.net application with following feature:
On each tab click i want to open new aspx page.

Regards
Amit Sharma
Princy
Top achievements
Rank 2
 answered on 30 Mar 2009
1 answer
110 views
  hello All,

            I want to bind the rad combo box using the database through the dropdown provider.i did the code but the items which are getting binded are appearing several times when I am clicking the downward arrow on the rad combo box.




please help me with this
thanks in advance
ritzie
Princy
Top achievements
Rank 2
 answered on 30 Mar 2009
1 answer
167 views

Hi Telerik team,

I need to create several RadGrid’s at run time according to the result of some queries, this means that I don’t have the exactly amount of RadGrids to be created on each pageload.

So at this point I am able to create the RadGrdis as needed, but I can’t make paging functionality works as expected.

I can surf only the first and second page, of my RadGrids, after that it appears that My RadGrids are not persisting on the server. I have try many options as enable the ViewState property, and others but without successful.

I am trying to follow this article to achieve my goal but I can not make, pages work as expected.

 Based on this article http://www.telerik.com/help/aspnet/grid/grdprogrammaticcreation.html Section: Create Telerik RadGrid entirely in the code behind

Any comment will be very useful.
Thanks in advanced.

Ivan Ruiz
Cytrux Software

Shinu
Top achievements
Rank 2
 answered on 30 Mar 2009
1 answer
178 views
Is there any easy way of switching cardview and listview with RadGrid?
Two radio buttons just above a RadGrid that users select to switch.

O View in CardView     O View in Listview

Thanks in advance,

Toby
Shinu
Top achievements
Rank 2
 answered on 30 Mar 2009
3 answers
135 views
Where can I find the list of built-in series palettes for the charts?  I've seen other people use "Rainbow" or "Colorful", and I've tried those with mixed results, but I haven't seen a list anywhere yet.
Vladimir Milev
Telerik team
 answered on 30 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?