Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
88 views
Hi I have a radsplitter declared as follows.
<telerik:RadSplitter ID="RdSplt" runat="server" Height="100%" Width="100%" Skin="Windows7">
                        <telerik:RadPane runat="server" ID="rdPnlIzq" Width="30%" ContentUrl="iuMenuProyectos.aspx">
                           
                        </telerik:RadPane>
                     
                        <telerik:RadPane runat="server" ID="rdPnlDer" Width="70%"
                           >
                            Right Pane
                        </telerik:RadPane >
                    </telerik:RadSplitter>

As you can see the rdPnIZq content is loaded from a different page which contains a radTreeView binded on page load as follows.

protected void Page_Load(object sender, EventArgs e)
       {
           cCatalogo oCatalogo=new cCatalogo();
           var ejes = oCatalogo.obtCatEjes();
           
 
           if (!IsPostBack)
           {
               var treeNodeReforma = new RadTreeNode("REFORMAS");
               RadTreeView1.Nodes.Add(treeNodeReforma);
               var reformas = oCatalogo.obtCTReforma();
               foreach (var ctReforma in reformas)
               {
 
                   treeNodeReforma.Nodes.Add(new RadTreeNode(ctReforma.fcDescRef));
                   foreach (RadTreeNode reforma in treeNodeReforma.Nodes)
                   {
                       var radtreenodeEje = new RadTreeNode("EJES");
 
                       reforma.Nodes.Add(radtreenodeEje);
                       foreach (var eje in ejes)
                       {
                           var ej = new RadTreeNode(eje.fcEje);
                           radtreenodeEje.Nodes.Add(ej);
                           ej.Nodes.Add(new RadTreeNode("PROYECTOS ESTRATÉGICOS"));
 
                           foreach (RadTreeNode ctproyEst in ej.Nodes)
                           {
                     
                               var s = oCatalogo.obtCatPE(ctReforma.fiIdReforma, eje.fiIdEje);
                                foreach (var proyEstrategico in s)
                                {
                                    var treeNodePE = new RadTreeNode(proyEstrategico.fcDescPE);
                                    ctproyEst.Nodes.Add(treeNodePE);
                                }
 
                           }
 
 
 
                           //foreach (RadTreeNode rdtnEje in ej.Nodes)
                           //{
                           //    var radtreenodePE = new RadTreeNode("PROYECTOS ESTRATÉGICOS");
 
                           //    rdtnEje.Nodes.Add(radtreenodePE);
 
                           //    var s = oCatalogo.obtCatPE(ctReforma.fiIdReforma, eje.fiIdEje);
                           //    foreach (var proyEstrategico in s)
                           //    {
                           //        var treeNodePE = new RadTreeNode(proyEstrategico.fcDescPE);
                           //        radtreenodePE.Nodes.Add(treeNodePE);
                           //    }
 
                           //}
                           
 
                       }
                       
                   }
               }
           }
       }

This page is loaded on the leftpane without problems.
But what I want to do is depending on the tree node I hit, load on the right panel a web page with information related to that node.

I tried the example attached to this KB
http://www.telerik.com/support/kb/aspnet-ajax/splitter/use-ajax-request-to-update-part-of-an-external-page-loaded-in-a-radpane.aspx

But in this example the button on the leftpane is placed within the pane itself no from another page like my treeview.

How can I achieve this with the leftpane content loaded from another page?

Hope your help.
Dobromir
Telerik team
 answered on 31 May 2012
10 answers
297 views

Hi All,

I am using Telerik Radtreeview, some of its node has checkbox enabled & image. Also i have used css to set the width of highligh to 100%. But the highlight & node width increses for the nodes which has checkbox & image than other nodes. Please let me know how we can keep width & highlight constant & within the Treeview Width.

Attaching image which shows actual issue also below is the code used.

This is very urgent issue for us so immediate response will be highly appreciated.

Thanks

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
    <style>
          
        .RadTreeView .rtIn {
            display:inline-block !important;
            white-space:normal !important; 
            width:100% !important;
             
        }
        .RadTreeView .rtTop 
        {
            white-space: nowrap !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadTreeView ID="RadTreeView2" runat="server" Skin="Windows7" CheckBoxes="true">
              
        </telerik:RadTreeView>
  
          <telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Windows7" CheckBoxes="true">
            <Nodes>
            <telerik:RadTreeNode runat="server" Text="Parent" ImageUrl="Dependency.GIF">
            <Nodes>
            <telerik:RadTreeNode runat="server" Text="Child0"></telerik:RadTreeNode>
            </Nodes>
            </telerik:RadTreeNode>
            </Nodes>
        </telerik:RadTreeView>
  
    </div>
    </form>
</body>
</html>
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
  
public partial class Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            RadTreeNode node = new RadTreeNode("Parent");
            RadTreeView2.Nodes.Add(node);
            node.ExpandMode = TreeNodeExpandMode.ServerSide;
            node.ImageUrl = @"Dependency.GIF";
        }
      
         
  
        RadTreeView2.NodeExpand += new RadTreeViewEventHandler(RadTreeView2_NodeExpand);
    }
  
    void RadTreeView2_NodeExpand(object sender, RadTreeNodeEventArgs e)
    {
        RadTreeNode node = new RadTreeNode("Childe" + e.Node.Level);
        node.Checkable = false;
        e.Node.Nodes.Add(node);
        e.Node.Expanded = true;
    }
  
    protected override void OnInit(EventArgs e)
    {
        RadTreeView2.NodeTemplate = new LabelTemplate();
  
        base.OnInit(e);
    }
}
  
class LabelTemplate : ITemplate
{
    /// <summary>
    /// Instantiate In Container
    /// </summary>
    /// <param name="container"></param>
    public void InstantiateIn(Control container)
    {
        string textToBind = string.Empty;
        if (container is RadTreeNode)
        {
            textToBind = ((RadTreeNode)container).Text;
        }
        Label label1 = new Label();
        label1.Text = textToBind;
        container.Controls.Add(label1);
    }
}
SergZ
Top achievements
Rank 1
 answered on 31 May 2012
0 answers
135 views
I tried to save a page to MHT file programmatically using the following code:


 CDO.Message msg = new CDO.MessageClass();
        ADODB.Stream srm = null;
        msg.MimeFormatted = true;
        msg.CreateMHTMLBody("Test.aspx", CDO.CdoMHTMLFlags.cdoSuppressNone, "", "");
        srm = msg.GetStream();
        srm.SaveToFile(@"F:\Sample.mht", ADODB.SaveOptionsEnum.adSaveCreateNotExist);
        msg = null;
        srm.Close();


It is failed on msg.CreateMHTMLBody("Test.aspx", CDO.CdoMHTMLFlags.cdoSuppressNone, "", "");  with message :

Error: Sys.WebForms.PageRequestManagerServerErrorException: The specified protocol is unknown.



Ricky
Top achievements
Rank 1
 asked on 31 May 2012
2 answers
153 views
Hi I think I found a bug. When the page has a tab with a space and there are controls that have data validation (RequiredFieldValidator & CustomValidator) stuff blows up ;)
I can fix the issue by removing the space in the tab name.

I am creating the tabs in my code behind as follows:

protected void Page_Load(object sender, System.EventArgs e)
{
    if (!Page.IsPostBack)
    {
        AddTab("Software Test Requirements");
        AddPageView(RadTabStrip1.FindTabByText("Software Test Requirements"));
        AddTab("System Requirements");
        AddTab("Application Contacts");
        AddTab("Discussions");
        AddTab("Links");
        AddTab("Approvals");
    }
}
 
private void AddTab(string tabName)
{
    RadTab tab = new RadTab();
    tab.Text = tabName;
    RadTabStrip1.Tabs.Add(tab);
}
 
 
 
protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
{
 
    string userControlName;
    switch (e.PageView.ID)
    {
        case "Software Test Requirements":
            userControlName = "ReleaseSoftwareRequirementsForm.ascx";
            break;
        case "System Requirements":
            userControlName = "ReleaseSoftwareRequirementsSysReqs.ascx";
            break;
        case "Application Contacts":
            userControlName = "ReleaseSoftwareRequirementsTechContacts.ascx";
            break;
        case "Discussions":
            userControlName = "ReleaseSoftwareRequirementsDiscussions.ascx";
            break;
        case "Links":
            userControlName = "ReleaseSoftwareRequirementsLinks.ascx";
            break;
        case "Approvals":
            userControlName = "ReleaseSoftwareRequirementsApprovals.ascx";
            break;
        default:
            userControlName = "ReleaseSoftwareRequirementsForm.ascx";
            break;
    }
 
 
 
 
    Control userControl = Page.LoadControl(userControlName);
    userControl.ID = e.PageView.ID + "_userControl";
 
    e.PageView.Controls.Add(userControl);
}
 
private void AddPageView(RadTab tab)
{
    RadPageView pageView = new RadPageView();
    pageView.ID = tab.Text;
    RadMultiPage2.PageViews.Add(pageView);
    pageView.CssClass = "pageView";
    tab.PageViewID = pageView.ID;
}
 
protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
{
    AddPageView(e.Tab);
    e.Tab.PageView.Selected = true;
}


I will add a couple of screen shots, let me know if you need more or if this is just something dumb I am doing.

Thanks!
Najid Hanif
Top achievements
Rank 2
 answered on 31 May 2012
1 answer
84 views
my situation is based on this example: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

the main differences in my scenario are that i am calling the radwindow from a grid hosted in an ajax control toolkit tab form. i have a radajaxmanager declared on the page outside of the scope of the tab. the first tab contains a grid whose selection drives the data selection results of two grids on another tab and 1 grid on a third tab. the third tab contains a radwindowmanager and radwindow which is opened from the grid. a selection is made whereupon a button click event of the radwindow (aspx.cs) writes the data and then calls for a refresh of the parent grid as follows:
ClientScript.RegisterStartupScript(Page.GetType(), "registerkey", "CloseAndRebind('Registration');", true);

which calls this from the radwindow (aspx) :
function CloseAndRebind(args) {
    GetRadWindow().BrowserWindow.refreshGrid(args);
    GetRadWindow().close();
}

which calls this from parent page's tab (aspx)
function refreshGrid(arg) {
if (!arg) {
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.ajaxRequest();
}
else {
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.ajaxRequest(arg);
}
}

which finally calls this in the aspx.cs

 

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
   RadGrid1.Rebind();
    RadGrid2.Rebind();
   RadGrid3.Rebind();
}

 

tab2 (with 2 grids) has radajaxmanagerproxy and the tab works well. tab3 with radgrid3 works ok when updated by tab1 grid1 but not when updated from the radwindow. i have tried radajaxmanagerproxy on tab 3 grid 3 with no success with and without a radajaxpanel.

i have never been able to debug into the ajaxrequest - not sure if it is possible. i have configured radajaxmanagerproxy through its editor but  it does not see the radajaxmanager.

any ideas about why tab3 will not rebind?

i don't need to update all of these grids each time but for now i am using this bloated code until i can get tab 3 to update properly...


tony
Top achievements
Rank 1
 answered on 31 May 2012
1 answer
744 views
Hello,

I am having a RadNumeric textbox to enter only numbers. I dont want allow user to enter more than 2 digits after decimal.

Here is my code. It is allowing more than 2 digits after decimal but it is rounding off to 2 digits after coming out of textbox.

I dont want user to allow more than 2 right away.
 <telerik:RadNumericTextBox  ID="txtNewPrice" runat="server" MaxLength="10"  AutoCompleteType="None"  MinValue="0" CssClass="txtException"
                            Width="50px"  Type="Number" ShowSpinButtons="false" AllowOutOfRangeAutoCorrect="false" InvalidStyle-Font-Bold="true">
                       <NumberFormat AllowRounding="false" DecimalDigits="2"  KeepNotRoundedValue="true" GroupSizes="3"/>
                  
                     </telerik:RadNumericTextBox>
Richard
Top achievements
Rank 1
 answered on 30 May 2012
1 answer
147 views
Hi,

I am implementing the autocomplete feature on RADComboBox. I would like to know what event is called for doing autocomplete and also can i override the inbuilt autocomplete search functionality
Richard
Top achievements
Rank 1
 answered on 30 May 2012
3 answers
143 views
My Customer names are very long.  So, in the filter column, it seems I need to stretch the Customer dropdown to see the down-arrow icon on the right.  My attachment shows this; it is too long.

How may I make the dropdown shorter in length and still see the down-arrow icon?

Thank you.

Rick
Richard
Top achievements
Rank 1
 answered on 30 May 2012
5 answers
282 views
Hi,
I have this requirement of displaying the LoadingPanel  for all post backs in the website's content pages. So what I did is to add the RadAjaxLoadingPanel  on top of the ContentPlaceHolder of the master page as shown below. This is working for even user control's post back in the content page in my test application. So I wanted to know if the approach is correct or in future I will get some issues with this approach not working for some controls or something? Can you please point out any disadvantages of this approach ?

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!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></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
     <telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1" runat="server">
        </telerik:RadAjaxManager>
       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2007"
   IsSticky="true" style="position:absolute; top:0; left:0; height:100%; width:100%" >
   Loading...
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" runat="server" Height="200px" Width="300px">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        
        </asp:ContentPlaceHolder>
        </telerik:RadAjaxPanel>
    </div>
    
    </form>
</body>
</html>
Maria Ilieva
Telerik team
 answered on 30 May 2012
8 answers
245 views

Followed the instructions provided in the following link, http://www.telerik.com/help/aspnet-ajax/moss-sp2010-different-configuration-files-for-different-webs.html, however the RadEditor does not display the appropriate css classes in the dropdown.  I'm pretty certain I've missed something, but am not sure what.
Rumen
Telerik team
 answered on 30 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?