Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
319 views
I trying to bind the orgChart to a large dataset and doesn't seem to work. The dataset contains about 150000 rows. I am using the latest Q2 Beta.
<telerik:RadOrgChart ID="RadOrgChart1" runat="server" EnableCollapsing="true" LoadOnDemand="NodesAndGroups" Skin="Office2010Blue">

 </telerik:RadOrgChart>

 

 protected void Page_Load(object sender, EventArgs e)
    {
        BindToDataSet(this.RadOrgChart1);
    }

    private static void BindToDataSet(RadOrgChart orgChart)
    {
        string dbConnectionString = ConfigurationManager.ConnectionStrings["mambophilprod"].ConnectionString;
        MySqlDataAdapter adapter = new MySqlDataAdapter("SELECT Id, ParentId, CurrentPosition From mambophil_flat_tree",
                                                    dbConnectionString);

        DataSet links = new DataSet();
        adapter.Fill(links);

        orgChart.DataTextField = "CurrentPosition";
        orgChart.DataFieldID = "Id";
        orgChart.DataFieldParentID = "ParentID";

        orgChart.DataSource = links;
        orgChart.DataBind();
    }

This is what I would like to do.
- I want to show the first few levels (say 10)
- When the user clicks on one of the last levels, the system fetches the next 10 levels.

Is this possible? Appreciate your help.
Sree

Peter Filipov
Telerik team
 answered on 06 Jun 2012
1 answer
137 views
How can I move RadCodeBlocks into an external .JS file? It seems like when I do, the <%= XXXX.ClientID %> formatting doesn't get parsed correctly.
Vasil
Telerik team
 answered on 06 Jun 2012
1 answer
160 views
How to get Current date in Number format in server side e.g. Year/Month/day( 20120604000000)

Thanks
Tamim
Eyup
Telerik team
 answered on 06 Jun 2012
8 answers
170 views


how can i Develop Itemplate class to support icons in expand column.


Thanks

Eyup
Telerik team
 answered on 06 Jun 2012
1 answer
157 views
I have a radscheduler that currently shows multi-day appointments on the start date with a small arrow indicating that it spans multiple days, however, i would like the appointment block to actually span the multiple days.

is this a setting i'm missing? i didn't find this functionality in any examples, however, in a related support ticket another user uploaded this screen shot:

http://www.telerik.com/ClientsFiles/299133_Multiday-monthview-bug.gif

ignore the red arrows and style issues - i want my appointments to span days like this.

any ideas?
Ivana
Telerik team
 answered on 06 Jun 2012
1 answer
92 views

Idid a same thing with another page in the same namespace and its working 

but here its not working and I am forced to paste the code ,Please sugggest the solution 

<%@ Page Title="Subscribe for Category" Async="true" Language="C#" MasterPageFile="~/singleMaster.master" AutoEventWireup="true" CodeFile="SuscribeCat.aspx.cs" Inherits="SuscribeCat" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
     </telerik:RadScriptManager>
 
   <br />
    <h2>   My Expert Profile</h2>
         <br />
         <table style="width:800px">
   <tr>
   <td style="width:3%">
   </td>
   <td>The main Categories you Subscribed</td>
    
   </tr>
    
   </table>
    
   <br />
   <table style=" width:800px">
   <tr>
   <td style=" width:5%"></td><td>
   <telerik:RadGrid ID="sub_cat_gird" OnItemCommand="del_sub" ShowHeader="false" ShowFooter="false"  runat="server" Width="600px" Skin="Sitefinity"
    AutoGenerateColumns="false" >
   <MasterTableView>
   <NoRecordsTemplate>  </NoRecordsTemplate>
   <Columns >
    
    
   <telerik:GridTemplateColumn>
   <ItemStyle Width="70px" />
   <ItemTemplate>
   <asp:Label ID="lblbl" runat="server" Text= '<%#Eval("name")%>' ></asp:Label>
   </ItemTemplate>
   </telerik:GridTemplateColumn>
    
   <telerik:GridTemplateColumn><ItemStyle Width="50px" /> <ItemTemplate> >> </ItemTemplate> </telerik:GridTemplateColumn>
    
   <telerik:GridTemplateColumn>
   <ItemStyle Width="70px" />
   <ItemTemplate>
   <asp:Label ID="lml" runat="server" Text='<%#Eval("sub_name") %>' ></asp:Label>
   </ItemTemplate>
   </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn><ItemStyle Width="50px" /> <ItemTemplate></ItemTemplate> </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn><ItemStyle Width="70px" /> <ItemTemplate></ItemTemplate> </telerik:GridTemplateColumn>
    
   <telerik:GridTemplateColumn>
   <ItemStyle />
   <ItemTemplate>
   <asp:Button ID="btn1" runat="server" Text="Delete" CssClass="art-button" CommandName="del_sub" CommandArgument=<%#Eval("sub_cat_id") %> />
   </ItemTemplate>
   </telerik:GridTemplateColumn>
    
   </Columns>
    
   </MasterTableView>
   
    </telerik:RadGrid>
    </td>
     </tr>
    </table>
    <%--<table style="width:800px">
    <tr><td style=" width:5%"></td></tr>
    </table>--%>
    
     <table style=" width:800px">
   <tr>
   <td style=" width:5%"></td>
   <td>
   <telerik:RadGrid ID="sub_sub_cat_grid" ShowHeader="false" ShowFooter="false"  runat="server" Width="600px" Skin="Sitefinity"
    OnItemCommand="del_sub_sub" AutoGenerateColumns="false" >
    
   <MasterTableView>
   <NoRecordsTemplate>  </NoRecordsTemplate>
   <Columns >
    
  <telerik:GridTemplateColumn>
  <ItemStyle Width="70px" />
  <ItemTemplate>
  <asp:Label ID="lki" runat="server" Text = '<%#Eval("main_name")%>'  ></asp:Label>
  </ItemTemplate>
  </telerik:GridTemplateColumn>
  
 <telerik:GridTemplateColumn><ItemStyle Width="50px" /> <ItemTemplate> >> </ItemTemplate> </telerik:GridTemplateColumn>
    
   
   
   <telerik:GridTemplateColumn>
   <ItemStyle  Width="70px" />
   <ItemTemplate>
   <asp:Label ID="lml" runat="server" Text='<%#Eval("sub_name") %>' ></asp:Label>
   </ItemTemplate>
   </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn><ItemStyle Width="50px" /> <ItemTemplate> >> </ItemTemplate> </telerik:GridTemplateColumn>
     <telerik:GridTemplateColumn>
     <ItemStyle Width="70px" />
     <ItemTemplate>
       <asp:Label ID="lml1" runat="server" Text='<%#Eval("sub_sub_name") %>' ></asp:Label>
     </ItemTemplate>
     </telerik:GridTemplateColumn>
 
   <telerik:GridTemplateColumn>
   <ItemStyle  />
   <ItemTemplate>
   <asp:Button ID="btn1" runat="server" Text="Delete" CssClass="art-button" CommandName="del_sub_sub" CommandArgument=<%#Eval("sub_sub_cat_id") %> />
   </ItemTemplate>
   </telerik:GridTemplateColumn>
    
   </Columns>
    
   </MasterTableView>
   
    </telerik:RadGrid></td>
     </tr>
    </table>
    <br/>
    
    <br/>
    <br/>
    
 
   
     
    <br/>
    <telerik:RadAjaxPanel ID="panel" runat="server">
    <table style=" width:800px">
    <tr style=" height:40px">
    <td style=" width:5%"></td>
     <td style=" width:25%"> Select Main Category</td>
     <td>
      
     <asp:DropDownList ID="DropDownList1" AppendDataBoundItems="true" runat="server" DataSourceID="main_cat"
                        DataTextField="name" DataValueField="main_cat_id"
                        onselectedindexchanged="DropDownList1_SelectedIndexChanged"  Width="200px"
                        AutoPostBack="true">
                        <asp:ListItem Selected="True" Value="0">Select a Category</asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="main_cat" runat="server"
                        ConnectionString="<%$ ConnectionStrings:QConnection %>"
                        SelectCommand="SELECT [main_cat_id], [name] FROM [main_cat_tbl]"></asp:SqlDataSource>
     </td>
    </tr>
 
    <tr style=" height:40px">
    <td style=" width:5%"></td>
     <td style=" width:25%"> Select Sub-Category</td>
     <td>
      <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="sub_cat"
                        DataTextField="name" DataValueField="sub_cat_id"
                        onselectedindexchanged="DropDownList2_SelectedIndexChanged"  Width="200px"
                        Enabled="false" AutoPostBack="true" AppendDataBoundItems="True">
                        <asp:ListItem Selected="True" Value="0">Select a subcategory</asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="sub_cat" runat="server"
                        ConnectionString="<%$ ConnectionStrings:QConnection %>"
                        SelectCommand="select sub_cat_id, name from sub_cat_tbl  where main_cat_id=@main_cat_id ">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="DropDownList1" Name="main_cat_id"
                                PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:SqlDataSource>
      
     </td>
    </tr>
 
    <tr style=" height:40px">
    <td style=" width:5%"></td>
     <td style=" width:25%"> Select Sub-Sub Category</td>
     <td>
     <asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="sub_sub_cat"
                        DataTextField="name" DataValueField="sub_sub_cat_id" Enabled="false" Width="200px"
                        AutoPostBack="true" AppendDataBoundItems="True">
                        <asp:ListItem Selected="True" Value="0">Select a subcategory</asp:ListItem>
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="sub_sub_cat" runat="server"
                        ConnectionString="<%$ ConnectionStrings:QConnection %>"
                        SelectCommand="select sub_sub_cat_id, name from sub_sub_cat_tbl  where sub_cat_id=@sub_cat_id ">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="DropDownList2" Name="sub_cat_id"
                                PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:SqlDataSource>
     </td>
    </tr>
 
    <tr style=" height:60px">
    <td style=" width:5%"></td>
     <td style=" width:25%"></td>
     <td>
     <asp:Button ID="Button1" runat="server" Text="Sign up as expert"
                        onclick="Button1_Click" />
     </td>
    </tr>
    <tr>
    <td></td><td></td><td></td><td> <asp:Label ID="SuscribtionStatus" runat="server" Visible="false" ></asp:Label></td>
    </tr>
    </table>
    </telerik:RadAjaxPanel>
     
    <telerik:RadAjaxManager ID="ajax_manger" runat="server" >
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="DropDownList1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DropDownList1" />
                    <telerik:AjaxUpdatedControl ControlID="DropDownList2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="DropDownList2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DropDownList2" />
                    <telerik:AjaxUpdatedControl ControlID="DropDownList3" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="DropDownList3">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DropDownList3" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="sub_cat_gird" />
                    <telerik:AjaxUpdatedControl ControlID="sub_sub_cat_grid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    
</asp:Content>

Eyup
Telerik team
 answered on 06 Jun 2012
1 answer
205 views
Hi, I have a strange problem that I cannot solve.  See this screen cast: http://screencast.com/t/SaskytTTX5V

As you'll notice I end up with two closing tags nested and butted up against each other, like so:

<p>Some <b>text</b></p>

The problem is that our customers get "stuck" in bold mode because there is no way they can get the cursor between the closing bold and closing paragraph tags without manually editing the HTML code. The screen cast was filmed using an up-to-date version of Chrome, but I think we see this problem in other browsers as well.

How can I get the cursor between those two closing tags?

Also, we have this issue when pasting in HTML from a custom toolbar button. How can I programmatically move the cursor between those two closing tags?  I've looked at many forum posts about using ranges to move the cursor, but none have helped me get in between the two closing tags.

Thanks in advance!
Rumen
Telerik team
 answered on 06 Jun 2012
1 answer
96 views
I have a content page that contains a RadSplitter.  On the left of the splitter is a RadPane with a Radtreeview. the treeview definition is below.

<telerik:RadTreeView ID="rtOutline"
                        runat="server" AccessKey="w"  CausesValidation="False"
                        EnableDragAndDrop="True"  EnableDragAndDropBetweenNodes="True"
                        EnableViewState="True"
                        CollapseAnimation-Type="None"
                        ExpandAnimation-Type="None" OnNodeExpand="rtOutline_NodeExpand" >
                <ContextMenus>
                    <telerik:RadTreeViewContextMenu ID="ElementMenu" runat="server"  EnableAutoScroll="True">
                    </telerik:RadTreeViewContextMenu>
                </ContextMenus>
                <ExpandAnimation Type="None" />
            </telerik:RadTreeView>

As you can see I have subscribed to the Node Expand event of the server side.  There is a lot of node building code in here so I won't post it all. however a single child node is successfully created (See image nodeDetail.gif). This image shows the Id from the menu
Protected Sub rtOutline_NodeExpand(sender As Object, e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles rtOutline.NodeExpand
    Dim newNode As RadTreeNode = NodeControl.LoadNodes(e.Node, rtOutline)
    e.Node = newNode
 
End Sub

The RadTreeContextMenu is also generated. See attachment MenuDetail.gif this image shows the detail of the menu including the fact that it has childitems.

The process is 
  • The node is generated
  • the node id is passed into a function to generate the RadTreeContextMenu  
    and the menu is returned.
  • the menu is added to the RadTreeView
  • the menu Id is assigned to the contextrmenuid property
  • the node is then added to its parent.
Dim nodeMenu As RadTreeViewContextMenu = myMenuBuilder.BuildMenu(targetNode)
nodeTreeview.ContextMenus.Add(nodeMenu)
targetNode.ContextMenuId = nodeMenu.ID

  • the parent is returned to the controlling function and attached to the tree

When I run this the new node shows perfectly but the menu does not.  It shows the standard IE Context menu See result.gif.

The code for building the menu is
Public Function BuildMenu(ByVal myNode As RadTreeNode) As RadTreeViewContextMenu
 
        Dim myMenu As New RadTreeViewContextMenu
        Dim menuElements As List(Of ElementWrapper) = LoadElements(myNode.Attributes("IID"))
        Dim helpItem As New RadMenuItem
        Dim iLoopCounter As Int32 = 0
 
        '***** Loading Menu Item
        Dim mnuLoading As New RadMenuItem
        mnuLoading.Text = "Loading..."
        mnuLoading.Enabled = False
 
        myMenu.Items.Add(mnuLoading)
 
        For Each a As ElementWrapper In menuElements
 
            Dim newMenuItem As New RadMenuItem
            newMenuItem.Text = a.Text
            newMenuItem.EnableImageSprite = a.Enabled
            newMenuItem.Attributes.Add("Command", a.Cmd)
            newMenuItem.Attributes.Add("CommandArg", a.CmdArg)
            newMenuItem.Attributes.Add("IID", myNode.Attributes("IID"))
 
            If a.Cmd = "HELP_MENU" Then
 
                helpItem = newMenuItem
                Dim aSplitter = New RadMenuItem
                aSplitter.IsSeparator = True
 
                Dim myStyle As New Style
                myStyle.Width = Unit.Pixel(125)
 
                aSplitter.ApplyStyle(myStyle)
                myMenu.Items.Add(aSplitter)
 
            ElseIf a.Cmd = "HELP_ITEM" Then
                helpItem.Items.Add(newMenuItem)
            Else
                myMenu.Items.Add(newMenuItem)
            End If
 
            iLoopCounter = iLoopCounter + 1
 
        Next
 
        Dim newHeight As Int32 = iLoopCounter * 25
        If newHeight > 250 Then newHeight = 250
 
        myMenu.AutoScrollMinimumHeight = newHeight
        myMenu.ID = "mnu" & myNode.Attributes("IID")
        myMenu.EnableViewState = True
        myMenu.ClientIDMode = ClientIDMode.Static
 
        Return myMenu
 
    End Function

I have tried this with and without the view state set and the ClientIDMode and still cannot get it to show,

Questions (in order of priority)
  1. Can you please advise why the menu would not activate?
  2. Why would the menu not be maintained if the viewstate is enabled.  this happens if I click on the node after it has been generated

Plamen
Telerik team
 answered on 06 Jun 2012
1 answer
205 views
Hi,

i am using RadTreeview in my project. For nodes we are using the contextmenu, so, they will be opened upon right click of mouse. this is fine.

as a part of section 508, how blind user will open that context menu on radtreeview node?
thanks,
Mohinder Goswami.
Plamen
Telerik team
 answered on 06 Jun 2012
3 answers
305 views
I am working in Sharepoint office365 (sandbox) project which has two webparts.
First one having telerik controls . Second webpart doesn't have any telerik code.
When i try to add those two webparts and browse it, first webpart is showing "Web Part Error: Sandboxed code execution request failed." error. Second webpart is showing right output without any error.

What is the problem , how can i get it done with telerik in sandbox. i have attached the source code and output screen shot. Please check that.
Kalina
Telerik team
 answered on 06 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?