Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
132 views
Hi,

we want to place 4 orgchart controls on the same page and only the 2 first appears.
The strange thing is that html tags are here but there is a visibility problem on the div with "rocViewPort" class.

Does anybody has already had this problem ?

Here is our code :

<telerik:RadOrgChart runat="server" ID="RadOrgChart1" GroupColumnCount="1" />
<telerik:RadOrgChart runat="server" ID="RadOrgChart2" GroupColumnCount="1" />
<telerik:RadOrgChart runat="server" ID="RadOrgChart3" GroupColumnCount="1" />
<telerik:RadOrgChart runat="server" ID="RadOrgChart4" GroupColumnCount="2" />
 
<asp:SqlDataSource id="SqlDataSource1" Runat="server" SelectCommand="SELECT id, idGroupe, nom, prenom, poste FROM INT_OrgEmployes" ConnectionString="<%$ ConnectionStrings:Intranet %>" ProviderName="<%$ ConnectionStrings:Intranet.ProviderName %>" /> 
<asp:SqlDataSource id="SqlDataSource5" Runat="server" SelectCommand="SELECT id, idParent, nom FROM INT_OrgGroupes WHERE idOrg=1" ConnectionString="<%$ ConnectionStrings:Intranet %>" ProviderName="<%$ ConnectionStrings:Intranet.ProviderName %>" />
<asp:SqlDataSource id="SqlDataSource6" Runat="server" SelectCommand="SELECT id, idParent, nom FROM INT_OrgGroupes WHERE idOrg=2" ConnectionString="<%$ ConnectionStrings:Intranet %>" ProviderName="<%$ ConnectionStrings:Intranet.ProviderName %>" />
<asp:SqlDataSource id="SqlDataSource7" Runat="server" SelectCommand="SELECT id, idParent, nom FROM INT_OrgGroupes WHERE idOrg=3" ConnectionString="<%$ ConnectionStrings:Intranet %>" ProviderName="<%$ ConnectionStrings:Intranet.ProviderName %>" />
<asp:SqlDataSource id="SqlDataSource8" Runat="server" SelectCommand="SELECT id, idParent, nom FROM INT_OrgGroupes WHERE idOrg=4" ConnectionString="<%$ ConnectionStrings:Intranet %>" ProviderName="<%$ ConnectionStrings:Intranet.ProviderName %>" />

ArrayList listOrg = new ArrayList();
 
listOrg.Add(RadOrgChart1);
listOrg.Add(RadOrgChart2);
listOrg.Add(RadOrgChart3);
listOrg.Add(RadOrgChart4);
 
foreach (RadOrgChart unOrg in listOrg)
{
    unOrg.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "id";
    unOrg.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "idGroupe";
    unOrg.GroupEnabledBinding.GroupItemBindingSettings.DataTextField = "nom";
    unOrg.RenderedFields.ItemFields.Add(new Telerik.Web.UI.OrgChartRenderedField() { DataField = "poste" });
    unOrg.GroupEnabledBinding.GroupItemBindingSettings.DataSource = SqlDataSource1;
}
 
RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "id";
RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "idParent";
RadOrgChart1.RenderedFields.NodeFields.Add(new Telerik.Web.UI.OrgChartRenderedField() { DataField = "nom" });
RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataSource = SqlDataSource5;
RadOrgChart1.DataBind();
 
RadOrgChart2.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "id";
RadOrgChart2.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "idParent";
RadOrgChart2.RenderedFields.NodeFields.Add(new Telerik.Web.UI.OrgChartRenderedField() { DataField = "nom" });
RadOrgChart2.GroupEnabledBinding.NodeBindingSettings.DataSource = SqlDataSource6;
RadOrgChart2.DataBind();
 
RadOrgChart3.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "id";
RadOrgChart3.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "idParent";
RadOrgChart3.RenderedFields.NodeFields.Add(new Telerik.Web.UI.OrgChartRenderedField() { DataField = "nom" });
RadOrgChart3.GroupEnabledBinding.NodeBindingSettings.DataSource = SqlDataSource7;
RadOrgChart3.DataBind();
 
RadOrgChart4.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "id";
RadOrgChart4.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "idParent";
RadOrgChart4.RenderedFields.NodeFields.Add(new Telerik.Web.UI.OrgChartRenderedField() { DataField = "nom" });
RadOrgChart4.GroupEnabledBinding.NodeBindingSettings.DataSource = SqlDataSource8;
RadOrgChart4.DataBind();







Peter Filipov
Telerik team
 answered on 11 Apr 2014
1 answer
90 views
Hello,

We are using a radscheduler and allow users to drag and drop appointments.  This triggers the server side OnAppointmentUpdate method just fine.

Protected Sub RadScheduler1_OnAppointmentUpdate(ByVal sender As Object, ByVal e As AppointmentUpdateEventArgs) Handles RadScheduler1.AppointmentUpdate

We currently update the modified date and move on. 
However we now need to display the form we use to add or edit an appointment. 

We currently are using the two methods on new or double click edit. 
Protected Sub RadScheduler1_FormCreating(ByVal sender As Object, ByVal e As SchedulerFormCreatingEventArgs)
Protected Sub RadScheduler1_FormCreated(ByVal sender As Object, ByVal e As SchedulerFormCreatedEventArgs) Handles RadScheduler1.FormCreated

This ideally would occur server side and we use VB.

From our OnAppointmentUpdate method can I either trigger the FormCreating method or do I need to call an intermediary method first.

Thank you


Plamen
Telerik team
 answered on 11 Apr 2014
1 answer
90 views
Hello,

I am having an issue where I've set up the row and group fields for an OLAP data source.  When the grid is displayed, the totals row is the only row that is displayed in the grid.

In the configuration panel, I can see the fields are in the "Row Fields" listbox, but they are not displaying in the grid.  If I drag the field from the Row Fields list box to the All Fields listbox and then back to the Row Fields listbox, the row(s) for the field then appears in the grid.

Any ideas on why they are not initially appearing?

Regards,
Scott
Pavlina
Telerik team
 answered on 11 Apr 2014
2 answers
791 views
Hello,

On my page I have a ComboBox where the user can choose a name and I also have a TextBox where the user can enter one or more values. I am trying to figure out how to take the value from the ComboBox (w/ @Name parameter) and the value(s) from the TextBox (w/ @ProductNum parameter(s))
and  use those as Parameters  together (@Name, @ProductNum) in a Procedure that I have created when I click the Generate Template button.

I am stuck and I am not sure what my next step should be. Any help would be appreciated.

aspx
<%@ Page Title="Product Template" Language="C#" MasterPageFile="~/MasterPages/M.Master" AutoEventWireup="true" CodeBehind="ProductTemplate.aspx.cs" Inherits="ProductTemplate" Theme="Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server" ViewStateMode="Inherit">
 
<style>
.addButton
{
    float: right;
    display: block;
}
 
</style>
 
 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="300px" Width="450px">
  
     <table>
        <tr>
            <td>
                <asp:Label ID="NameLbl" runat="server" Text="Name: " Width="120px" ></asp:Label>
            </td>
            <td>
                <telerik:RadComboBox ID="NameRCB" runat="server" AutoPostBack="True" DataSourceID="dllDataSource"
                    DataTextField="Customer_Name" DataValueField="Customer_Name" Width="200px"
                    AppendDataBoundItems="true">
                    <Items>
                        <telerik:RadComboBoxItem Text="- Name -" Value="0" Selected="true"></telerik:RadComboBoxItem>
                    </Items>
                </telerik:RadComboBox>
            </td>
            <td></td>
            <td>
                <asp:Label ID="ProductLbl" runat="server" Text="Product: "></asp:Label>
            </td>
            <td>
                <telerik:RadTextBox ID="ProductTB" runat="server">
                </telerik:RadTextBox>
            </td>
            <td></td>
            <td>
                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" Display="None"
                    ControlToValidate="ProductTB" ErrorMessage="Enter a Product Number"></asp:RequiredFieldValidator>
                <telerik:RadButton ID="RbSelect" runat="server" Text=" Select "
                    onclick="RbSelect_Click" />
            </td>
        </tr>
    </table><br />
 
 
    <!-- list -->
 
        <telerik:RadListBox ID="RadListBox1" runat="server" Height="250px">
        </telerik:RadListBox>
 
        <telerik:RadTextBox ID="RadTextBox1" runat="server" TextMode="MultiLine" Height="250px" Width="200px" >
        </telerik:RadTextBox>
    </telerik:RadAjaxPanel>
 
 
    <br />
 
    <telerik:RadButton ID="RbGenerate" runat="server" Text="Generate Template" style="margin-left: 150px" onclick="RbGenerate_Click">
    </telerik:RadButton>
     
    <br />
    <br />
 
    <asp:ValidationSummary runat="server" ShowMessageBox="false" ID="ValidationSummary1">
    </asp:ValidationSummary>
 
    <!-- datasource for RadComboBox -->
    <asp:SqlDataSource ID="dllDataSource" runat="server"
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="dbo.DropDownPROC" SelectCommandType="StoredProcedure" >
    </asp:SqlDataSource>
    <!-- datasource for grid -->
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="NameRCB">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="OrdersGrid" LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="NameRCB"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
 
</asp:Content>


.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data.SqlClient;
using System.Data;
 
namespace EE.Intranet.Purchasing
{
    public partial class ProductTemplate : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void RbSelect_Click(object sender, EventArgs e)
        {
             
            RadTextBox1.Text = ProductTB.Text;
            RadListBox1.Items.Add(new RadListBoxItem(HttpUtility.HtmlEncode(ProductTB.Text.Trim())));
            ProductTB.Text = string.Empty;
        }
 
        protected void RbGenerate_Click(object sender, EventArgs e)
        {
 
            /*using (SqlConnection conn = new SqlConnection("connection1"))
            {
                conn.Open();
 
                SqlCommand comm = new SqlCommand("dbo.sp_Proccccc", conn);
                comm.CommandType = CommandType.StoredProcedure;
                comm.Parameters.Add(new SqlParameter("@Name", Name));
                comm.Parameters.Add(new SqlParameter("@ProductNum", ProductNumber));
                comm.ExecuteNonQuery();
 
                conn.Close();
            }*/
        }
    }
}



I have also attached a pic of what  my current page looks like.

Thank you,

Brett
Danail Vasilev
Telerik team
 answered on 11 Apr 2014
2 answers
204 views
I have a file explorer on a screen and it loads the treeview, but it always shows the right arrow next to every folder regardless if it has files or not.  How do you set it to not show that arrow if the folder is empty
Vessy
Telerik team
 answered on 11 Apr 2014
1 answer
302 views

 protected void GridsettSave_Click(object sender, EventArgs e)
        {
 foreach (GridDataItem item in RadGridCommonSetting.Items)
            {
                RadSkinManager Skin = item.FindControl("Skin") as RadSkinManager;
                DropDownList CellSelectionMode = item.FindControl("CellSelectionMode") as DropDownList;
          }
       }
but this code shows Null every time
Princy
Top achievements
Rank 2
 answered on 11 Apr 2014
2 answers
52 views
The editors design view is empty and to small in Chrome 34 if the editor is in a radWindow. 

<asp:Button runat="server" ID="btnOpenPopup" Text="Open poup" OnClick="btnOpenPopup_Click" />
 
        <telerik:RadWindow ID="rdwNewAddressAtLocation" runat="server" Width="805" Height="450">
            <ContentTemplate>
                <telerik:RadEditor ID="redNotes" Skin="Default" NewLineBr="true" height="200" width="400"
                    runat="server" Language="sv-SE" StripFormattingOnPaste="MSWordRemoveAll" ContentFilters="FixEnclosingP">
                </telerik:RadEditor>
            </ContentTemplate>
        </telerik:RadWindow>
protected void btnOpenPopup_Click(object sender, EventArgs e)
    {
        rdwNewAddressAtLocation.VisibleOnPageLoad = true;
        redNotes.Content = "<b>Testing</b>";
    }
Mattias Björklund
Top achievements
Rank 1
 answered on 11 Apr 2014
3 answers
181 views
Hi,
We've got a RadScheduler in MonthView that displays a large amount of appointments per cell, somewhere in the range of 20 appointments per day. We want to display all the appointments (i.e we don't want to allow drill down into month). We have achieved this by setting the property that sets the number of appointments displayed in monthview.

Our problem now is that the page takes a ridiculous amount of time to render. The problem isn't serverside, as the request to the server happens quickly.
The problem occurs on the client side .... Is there some sort of optimisation we can make to allow the Scheduler to render more efficiently? It takes up to a minute for it to render (and we get those "script taking a while to run" messages which we need to allow to continue)..
Is this just a limitation on what is possible with the scheduler? Can someone confirm that the Scheduler just attempts to render/process the appointments for the date range supplied?

Thanks
Plamen
Telerik team
 answered on 11 Apr 2014
8 answers
295 views
Hi,

today I switch to the Q2 2013 version and in many styles (like Office2010Blue) the text inside the button isn't centered correctly anymore. I looked into the rendered HTML code and I found the following style inside the button:

style="width:100%;padding-left:0;padding-right:0;padding-left:4px;"

I'm not sure if this is a design bug or a feature or if I have to do something to change this. But the two padding-left styles look a little bit strange for me.
So, is there any way to center the text correctly again!?

Best regards
Martin Horst





Bozhidar
Telerik team
 answered on 11 Apr 2014
3 answers
148 views
Using AsyncUpload that previews images via a radlistview before user selects final upload (also allowing image removal)

Using the following javascript to delete all file inputs so as not to show the normal message upon file selection:
function filesUploaded(sender, args) {$find("<%= RadAjaxPanel1.ClientID%>").ajaxRequest() sender.deleteAllFileInputs(); //cleans up any not removed from fileuploaded   }

Have also added client side validation as per this great demo:  http://demos.telerik.com/aspnet-ajax/asyncupload/examples/validation/defaultvb.aspx

All works well accept that the error messages will only appear if user is only uploading one or many files that are all invalid.  When using multiple file upload if one of the files is valid, the function mentioned above with deleteAllFileInputs appears to remove the files with error messages as well (by design, I'd imagine). 
I'd obviously like the user to see the files with error messages only.
Is there any way to limit deleteAllFileInputs to just the validated files?

Thanks

Glenn



Hristo Valyavicharski
Telerik team
 answered on 11 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?