Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
181 views
I originally posted this in an existing thread but did not get any reponse so I am starting a new thread for this:

We have 4 calendar control per row in a radGrid.
Performance is extremly slow (as mentionned by Telerik as there is alot of rendering for these controls), we went back to our old calendar control, BasicDatePicker, and performance has improved drastically.

However we are having issues with the Javascript associated with the BasicDatePicker.

1) The javascript associated with the control doesn't fire (looks like the javascript call is being intercepted by a radControl

2) If we include their .js files in the Telerik:RadScriptBlock it errors out when calling the BasicDatePicker javascript indicating that BasicDatePicker is undefined.

How can I use a third party control that has it's own javascript associated with it in a radGrid.

Thanks.
Alex
Top achievements
Rank 2
 answered on 09 Jun 2008
2 answers
144 views
To convert my old skin to the new model I am a little confused by the migrating skins section of the helpfile for the ajax radtabstrip where ".selected" converts to "rtsSelected"

My new migrated skin that does not work (the tabs just show as unformated links in startard html blue) was based on one that worked really well in the classic version - would it be possible to look at the following and see where I am interpreting the migration instructions wrong:

.RadTabStrip_CiviCorps

{

font: 8pt tahoma, sans-serif;

text-align:center;

background-repeat: repeat-x;

border-bottom: solid 4px #6d9675;

height: 25px;

margin-top: -3px;

}

.RadTabStrip_CiviCorps

rtsUL

{

/**/

}

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink

{

margin-right: 5px;

margin-top: -1px;

padding-left: 0px;

background-color: #ccd0bf;

color: black;

text-decoration: none;

line-height: 25px;

border-right: solid 1px white;

border-top: solid 1px white;

}

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink:hover

{

background-color: #aacf16;

color: white;

text-decoration: underline;

line-height: 25px;

}

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink .rtsOut

{

padding-right: 0px;

}

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink .rtsIn

{

padding:0 5px;

}

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink.rtsSelected

{

line-height: 25px;

color: white;

}

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink.rtsSelected .rtsOut

{

background-color: #6d9675;

}

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink.rtsSelected .rtsIn

{

background-color: #6d9675;

}

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink.rtsSelected:hover,

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink.rtsSelected:hover .rtsOut,

.RadTabStrip_CiviCorps

.rtsLevel1 rtsLI rtsLink.rtsSelected:hover .rtsIn

{

background-color: #6d9675;

}







Please confirm that the following section:

.

RadTabStrip_CiviCorps .level2 li a.selected,

.RadTabStrip_CiviCorps .level2 li a.selected:hover,

.RadTabStrip_CiviCorps .level2 li a:hover

{

color: black;

}

converts to:

.RadTabStrip_CiviCorps .rtsLevel2 rtsLI rtsLink.rtsSelected,  

.RadTabStrip_CiviCorps .rtsLevel2 rtsLI rtsLink.rtsSelected:hover,  

.RadTabStrip_CiviCorps .rtsLevel2 rtsLI rtsLink:hover  

{  

    color: black;  

}  

thanks!

Jonathan
Top achievements
Rank 1
 answered on 09 Jun 2008
4 answers
213 views
Please run this in your environment, an ASPX page loading two UserControls Dynamically. The second UserControl adds Tabs via client code. Press the Click buttons on Tab2.

Could someone tell me what is wrong and why the nested Tabs will not work?

Thanks

Content Page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NestedTabDynamicUC.aspx.cs" Inherits="NestedTabDynamicUC_NestedTabDynamicUC" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title>NestedTabDynamicUC</title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
     
    <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
    <telerik:RadAjaxManager ID="RadAjaxManagerMaster" runat="server"> 
    </telerik:RadAjaxManager> 
     
    <div> 
    <asp:Label ID="lblMessage" runat="server" /> 
        <telerik:RadTabStrip Visible="true" BorderStyle="Solid" BorderColor="black" BorderWidth="0px"   
        ID="RadTabStrip1" runat="server" Skin="Outlook" SelectedIndex="0" AutoPostBack="true"  
        OnTabClick="RadTabStrip1_TabClick"> 
        <Tabs> 
            <telerik:RadTab Text="Tab 1" ID="tab0" runat="server"></telerik:RadTab> 
            <telerik:RadTab Text="Tab 2" ID="tab1" runat="server"></telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
     
    <asp:Panel ID="pnlControls" runat="server" style="padding:5px 1px 2px 5px;" /> 
     
     
    </div> 
     
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> 
<AjaxSettings> 
             
    <telerik:AjaxSetting AjaxControlID="RadTabStrip1"> 
        <UpdatedControls> 
            <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
            <telerik:AjaxUpdatedControl ControlID="pnlControls" LoadingPanelID="RadAjaxLoadingPanel1" /> 
            <telerik:AjaxUpdatedControl ControlID="lblMessage" /> 
        </UpdatedControls> 
    </telerik:AjaxSetting> 
     
             
</AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30" BackColor="#E0E0E0"> 
    <asp:Image ID="Image1" ImageUrl="~/Images/Loading7.gif" BorderWidth="0px" AlternateText="Loading"  
    runat="server" Style="margin-top: 45px;" /> 
</telerik:RadAjaxLoadingPanel> 
 
 
    </form> 
</body> 
</html> 
 

Content Page Code Behind
using System; 
using System.Collections; 
using System.Configuration; 
using System.Data; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.HtmlControls; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
 
public partial class NestedTabDynamicUC_NestedTabDynamicUC : System.Web.UI.Page 
{ 
    #region Properties 
 
    private string LatestLoadedControlName 
    { 
        get { return (string)ViewState["LatestLoadedControlName"]; } 
        set { ViewState["LatestLoadedControlName"] = value; } 
    } 
    #endregion 
    #region Page Events 
 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (LatestLoadedControlName != null) 
        { 
            LoadUserControl(LatestLoadedControlName); 
        } 
        else 
        { 
            LoadUserControl("WebUserControl.ascx"); 
        } 
    }  
    #endregion 
    #region Tabs Events 
 
    protected void RadTabStrip1_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e) 
    { 
        lblMessage.Text = e.Tab.Text + " " + e.Tab.SelectedIndex.ToString() + " " + e.Tab.ID; 
 
        switch (e.Tab.ID.ToUpper()) 
        { 
            case "I0": 
                LoadUserControl("WebUserControl.ascx"); 
                break; 
            case "I1": 
                LoadUserControl("WebUserControl2.ascx"); 
                break; 
            default: 
                LoadUserControl("WebUserControl.ascx"); 
                break; 
        } 
 
    } 
 
    private void LoadUserControl(string controlName) 
    { 
        if (LatestLoadedControlName != null) 
        { 
            Control previousControl = pnlControls.FindControl(LatestLoadedControlName.Split('.')[0]); 
            if (!Object.Equals(previousControl, null)) 
            { 
                this.pnlControls.Controls.Remove(previousControl); 
            } 
        } 
        string userControlID = controlName.Split('.')[0]; 
        Control targetControl = pnlControls.FindControl(userControlID); 
        if (Object.Equals(targetControl, null)) 
        { 
            UserControl userControl = (UserControl)this.LoadControl(controlName); 
            //slashes and tildes are forbidden 
            userControl.ID = userControlID.Replace("/", "").Replace("~", ""); 
            this.pnlControls.Controls.Add(userControl); 
            LatestLoadedControlName = controlName; 
        } 
    }  
    #endregion 
} 
 

WebUserControl.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="NestedTabDynamicUC_WebUserControl" %> 
User Control 1 
<br /> 
<telerik:radcodeblock ID="RadCodeBlock2" runat="server"> 
    <%=System.DateTime.Now.ToString() %> 
</telerik:radcodeblock> 

WebUserControl2.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl2.ascx.cs" Inherits="NestedTabDynamicUC_WebUserControl2" %> 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
<script type="text/javascript"> 
 
function addNewTab() 
{     
    //Adds the tab to the Tabs Collection of the selected tab 
    var persistChanges = true; 
     
    var tabStrip = $find("<%= RadTabStrip1.ClientID %>"); 
    var mymultiPage = $find('<%= RadMultiPage1.ClientID %>'); 
     
    var tabCount = tabStrip.get_tabs().get_count(); 
    // Check if we have already opened the Tab 
    for (i = 0; i< tabCount; i++) { 
        var tab2 = tabStrip.get_tabs().getTab(i); 
        if (tab2 != null) { 
            if (tab2.get_text() == "Tab Id " + arguments[0].toString()) { 
                tab2.select(); 
                return false; 
            } 
        } 
    } 
     
    var selectedTab = tabStrip.get_selectedTab(); 
    var test = arguments[0]; 
     
    if (persistChanges) { 
        tabStrip.trackChanges(); 
        mymultiPage.trackChanges(); 
    }        
    var tab = new Telerik.Web.UI.RadTab(); 
    tabStrip.get_tabs().add(tab);    
    tab.set_text("Tab Id " + arguments[0].toString()); 
    tab.select(); 
         
    var pageView = new Telerik.Web.UI.RadPageView();     
    mymultiPage.get_pageViews().add(pageView); 
     
    pageView.get_element().innerHTML = "Page content here " + arguments[0].toString(); 
     
    pageView.set_selected(true);     
     
    if (persistChanges) { 
        tabStrip.commitChanges(); 
        mymultiPage.commitChanges();  
    } 
    return false;       
} 
 
</script> 
</telerik:RadCodeBlock> 
 
<ul> 
    <li>Load Tab 21&nbsp;<input type="button" value="Click" onclick="return addNewTab('1');" /></li> 
    <li>Load Tab 22&nbsp;<input type="button" value="Click" onclick="return addNewTab('2');" /></li> 
</ul> 
 
<hr style="width:1px;" /> 
 
<telerik:RadTabStrip runat="server" ID="RadTabStrip1" Skin="Outlook" Style="float:left"  
            SelectedIndex="0" CssClass="tabStrip" MultiPageID="RadMultiPage1"> 
            </telerik:RadTabStrip> 
             
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" CssClass="multiPage" 
            BorderStyle="Solid"  
            BorderWidth="1px"  
            BorderColor="#999999">             
            </telerik:RadMultiPage> 
             
 
             

Officialboss
Top achievements
Rank 1
 answered on 09 Jun 2008
8 answers
376 views
"invalid json primitive: undefined" pops up in IE when I start my web app.

I have isolated it to a single control inside a sliding panel.  On this control if I set height and width both to 100%, I do not get the error message.  If I instead set height and width to something fixed like 300px, then I get the message.  The control is third party, ESRI ArcGIS Server Map control.

My page is a simple nested splitter design. 

If I create a new page just a splitter, and two panels, one with the map control, then I do not get the error.

How do you even begin to troublshoot "invalid json primitive: undefined" popup problem?




Shawn
Top achievements
Rank 1
 answered on 09 Jun 2008
5 answers
122 views
When I insert new code block I could set its height and width properties, but how I could later change them?

Thnx.
Rumen
Telerik team
 answered on 09 Jun 2008
2 answers
414 views

I have installed RadEditor on WSS with complete success.  The only thing that bothers me is that when viewing list pages through Firefox, a link stating "Click for help about adding basic HTML formatting" is placed below each RadEditor box.  Any ideas on how to remove those links? 

Thanks!

Charles
Top achievements
Rank 1
 answered on 09 Jun 2008
1 answer
113 views
I am maintaining/extending an asp.net ajax app that basically uses the scriptmanager, updatepanel, and updateprogress components.
I am planning on gradually rolling in some Telerik rad ajax controls soon.
Should I go through the project and first replace the scriptmanager, updatepanel, and updateprogress components with the rad ajax equivalents, e.g.,
RadScriptManager, Rad???, and RadAjaxLoadingPanel (Rad??? = I don't know what the equivalent control would be - can't tell by the "rad..." name).
Is this a valid assumption on my part?
I have not had any luck in my search for documentation on this subject.  If there is some, please provide a link or specific search keyword string.  Most of the code snippets I have looked at are just that, snippets, and with these controls being totally new to me, there does not seem to be a simple "start here...".
My cursory attempts have not been successful, for example, I added a RadAjaxLoadingPanel control to a page, added a thread.sleep(3000) to the page_load(), and I do not see any "loading..." message on the web page.
Thanks for your direction to a complete newbie on Telerik controls.
Erjan Gavalji
Telerik team
 answered on 09 Jun 2008
2 answers
224 views
hi ,
        Is it possible to Enable / disable  Context menu items on tree view item right click from Javascript.


Thanks,

Vinod


            
Veselin Vasilev
Telerik team
 answered on 09 Jun 2008
1 answer
160 views
I'm making something similar to this example--
http://www.telerik.com/demos/aspnet/prometheus/Panelbar/Examples/ApplicationScenarios/OutlookNavigation/DefaultCS.aspx

In the ASPX:

<telerik:RadTreeView ID="RadTreeView1" runat="server" MultipleSelect="True" Skin="Office2007" Height="213px" OnLoad="OnTreeLoad">
</telerik:RadTreeView>

In the C#:
 protected void OnTreeLoad(object sender, System.EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            RadTreeView tree = (RadTreeView)sender;
            tree.LoadContentFile("xml/app_config.xml");
        }
    }

In the XML:
<?xml version="1.0" encoding="utf-8" ?>
<PanelItems>
</PanelItems>


This generates an error which comes from inside the treeview code:

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
Telerik.WebControls.RadTreeViewXmlParser.LoadFromXmlElement(XmlElement parentNodeElement, RadTreeNodeCollection nodeCollection, Int32 level) +29
Telerik.WebControls.RadTreeViewXmlParser.LoadFromXml(String xmlString) +106
Telerik.WebControls.RadTreeView.LoadContentFile(String path) +143
MasterPage.OnTreeLoad(Object sender, EventArgs e) in c:\adminui\MasterPage.master.cs:47
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.WebControls.DataBoundControl.OnLoad(EventArgs e) +46
Telerik.WebControls.RadTreeView.OnLoad(EventArgs e) +37
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

Ed Bassin
Top achievements
Rank 1
 answered on 09 Jun 2008
4 answers
248 views
Hello,

is there an issue with horizontal scrolling in a PanelBar ItemTemplate? Vertical scrolling works fine. I have a TreeView inside the template, but the horizontal scrollbar does not appear when the TreeView is expanded.

I found the same issue at: http://www.telerik.com/community/forums/thread/b311D-edhac.aspx

Greetings
Philip
Andreas Kaech
Top achievements
Rank 1
 answered on 09 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?