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

What i am trying to do is to implement the scheduler into a login system.

After logging into the system, the users can have their own set of schedules, there will be a team calendar for them to view  (but not edit ). All the resource styles (eg. different color of the appointment block layout) are automatically generated according to the project group members, and when the user click on a particular appointment, he/she are not suppose to choose any resource (eg. user ).

I am able to generate the resources according to their login role, but i don't know how to disable the related resources in the UI part. 


Thanks,
Sunny
 
Peter
Telerik team
 answered on 23 Apr 2010
1 answer
148 views

I am working with VS 2008 with ASP.NET AJAX Q1 2010 ListBox control.

Code in my ASPX page

<telerik:RadListBox ID="radRotationSource" runat="server" AllowTransfer="True"   
                            style="width: 200px" TransferMode="Copy"   
                            TransferToID="radRotationDestination" Skin="Windows7">  
<ButtonSettings ReorderButtons="Common"></ButtonSettings> 
                        </telerik:RadListBox>    
                        <telerik:RadListBox ID="radRotationDestination" runat="server"   
                            style="width: 200px" Skin="Windows7">  
                            <ButtonSettings ReorderButtons="Common">  
                            </ButtonSettings> 
                        </telerik:RadListBox> 

C# Code to load Source RadListBox
            Database db = null;  
 
            db = DatabaseFactory.CreateDatabase();  
            DataSet ds = db.ExecuteDataSet(CommandType.StoredProcedure, "GetAllUsersForRotation");  
            db = null;  
            radRotationSource.DataSource = ds;  
            radRotationSource.DataTextField = "Login";  
            radRotationSource.DataValueField = "UserID";  
            radRotationSource.DataBind();  
            radRotationSource.Sort = Telerik.Web.UI.RadListBoxSort.Ascending;  
            radRotationSource.SortItems();    

C# Code to Save values from Destination RadListBox
        protected void btnSave_Click(object sender, EventArgs e)  
        {  
            Database db = null;  
 
            db = DatabaseFactory.CreateDatabase();  
 
            int rows = db.ExecuteNonQuery(CommandType.StoredProcedure, "ClearUsersInRotation");  
 
            string[] arr = new string[2];  
 
            for (int x = 1; x < radRotationDestination.Items.Count; x++)  
            {  
                arr[0] = radRotationDestination.Items[x].DataItem.ToString();  
                arr[1] = radRotationDestination.Items[x].DataKey.ToString();  
                rows = db.ExecuteNonQuery("SetUsersInRotation", arr);  
            }  
 
            db = null;  
        } 

The code for loading up the Source RadListBox works fine and I have all the users correctly and I am able to transfer them using the buttons over to the Destination RadListBox.  The problem is when I click on the SAVE button and want to grab the DataValueField and the position of each item in the Destination RadListBox and store it in the database, I have no values.
nightvision miami
Top achievements
Rank 1
 answered on 23 Apr 2010
3 answers
270 views
Aloha!

I'm currently working with the Q3 2009 version of the ASP.NET controls and seem to have hit an oddity with the RadDatePicker (and probably other) controls when setting the EmptyMessage and performing optional field validation.  I've set the EmptyMessage on the control and also have a RangeValidator applied to it; validators don't typically validate empty text and this is fine on the client validation (no error) but server-side fails as the ValidationDate is set to the EmptyMessage value, causing the RangeValidator to try and validate.

Is there a way around this, short of making code changes and performing custom validation, enabling/disabling validators etc?  Or should I just remove the EmptyMessage value?  I've read a couple of other threads here discussing always catching the (possibly invalid) data entered in ValidationDate but in this case, there is no explicit data entry.

Thanks in advance.

Kev.
Dimo
Telerik team
 answered on 23 Apr 2010
5 answers
373 views
Hello,

we´ve been using RadControls for more than one year now. But since version 4.x of RadChart we have problems with ChartSeries Labels.
In case of IntelligentLabelsEnabled="false" all labels are shown, but overwrite each other and do not look very well positioned. If IntelligentLabelsEnabled is set to true, it looks much better, but some labels just disappear or overwrite each other, too.

We now use RadControls for ASP.NET AJAX 2008 1 619.

Here is some code to reproduce the problem:

Default.aspx:
//***************************************

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadChartBugs._Default" %>

<%@ 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>Untitled Page</title>
</head>
<body style="width: 100%">
    <form id="form1" runat="server" style="width: 100%">
    <asp:Panel ID="Panel1" runat="server" Width="100%" BackColor="AliceBlue">
        <telerik:RadChart ID="RadChart1" runat='server' Width="1100px" Height="500px"
            IntelligentLabelsEnabled="true" AutoLayout="true">
            <PlotArea>
                <EmptySeriesMessage TextBlock-Text="(Keine Daten vorhanden)">
                </EmptySeriesMessage>
            </PlotArea>
            <ChartTitle TextBlock-Text="IntelligentLabelsEnabled='true' AutoLayout='true'">
            </ChartTitle>
        </telerik:RadChart>
        <telerik:RadChart ID="RadChart3" runat='server' Width="1100px" Height="500px"
            IntelligentLabelsEnabled="false" AutoLayout="true">
            <PlotArea>
                <EmptySeriesMessage TextBlock-Text="(Keine Daten vorhanden)">
                </EmptySeriesMessage>
            </PlotArea>
            <ChartTitle TextBlock-Text="IntelligentLabelsEnabled='false' AutoLayout='true'">
            </ChartTitle>
        </telerik:RadChart>
        <telerik:RadChart ID="RadChart5" runat='server' Width="1100px" Height="500px"
            IntelligentLabelsEnabled="true" AutoLayout="true">
            <PlotArea>
                <EmptySeriesMessage TextBlock-Text="(Keine Daten vorhanden)">
                </EmptySeriesMessage>
            </PlotArea>
            <ChartTitle TextBlock-Text="IntelligentLabelsEnabled='true' AutoLayout='true'">
            </ChartTitle>
        </telerik:RadChart>
        <telerik:RadChart ID="RadChart7" runat='server' Width="1100px" Height="500px"
            IntelligentLabelsEnabled="false" AutoLayout="true">
            <PlotArea>
                <EmptySeriesMessage TextBlock-Text="(Keine Daten vorhanden)">
                </EmptySeriesMessage>
            </PlotArea>
            <ChartTitle TextBlock-Text="IntelligentLabelsEnabled='false' AutoLayout='true'">
            </ChartTitle>
        </telerik:RadChart>
        <telerik:RadChart ID="RadChart9" runat='server' Width="1100px" Height="500px"
            IntelligentLabelsEnabled="true" AutoLayout="true">
            <PlotArea>
                <EmptySeriesMessage TextBlock-Text="(Keine Daten vorhanden)">
                </EmptySeriesMessage>
            </PlotArea>
            <ChartTitle TextBlock-Text="IntelligentLabelsEnabled='true' AutoLayout='true'">
            </ChartTitle>
        </telerik:RadChart>
        <telerik:RadChart ID="RadChart11" runat='server' Width="1100px" Height="500px"
            IntelligentLabelsEnabled="false" AutoLayout="true">
            <PlotArea>
                <EmptySeriesMessage TextBlock-Text="(Keine Daten vorhanden)">
                </EmptySeriesMessage>
            </PlotArea>
            <ChartTitle TextBlock-Text="IntelligentLabelsEnabled='false' AutoLayout='true'">
            </ChartTitle>
        </telerik:RadChart>
    </asp:Panel>
    </form>
</body>
</html>


//***************************************

Default.aspx.cs:

//***************************************

using System.Drawing;
using System;
using Telerik.Web.UI;
using Telerik.Charting.Styles;
using Telerik.Charting;
namespace RadChartBugs
{
    public partial class _Default : System.Web.UI.Page
    {
        const int MAX_PIE_CHART_ITEMS = 10;
        static readonly Color[] _pieChartColors = new Color[]{
        Color.Red, Color.Purple, Color.Plum,
        Color.Blue, Color.Coral, Color.Cyan,
        Color.Green, Color.Indigo, Color.Magenta,
        Color.Yellow, Color.Teal, Color.Salmon,
        Color.OrangeRed
    };

        protected void Page_Load(object sender, EventArgs e)
        {
            PrepareChart1(RadChart1);
            PrepareChart1(RadChart3);

            PrepareChart2(RadChart5);
            PrepareChart2(RadChart7);

            PrepareChart3(RadChart9);
            PrepareChart3(RadChart11);
        }

        protected void PrepareChart1(RadChart chart)
        {
            chart.PlotArea.XAxis.Appearance.LabelAppearance.Visible = false;
            chart.PlotArea.YAxis.Appearance.ValueFormat = ChartValueFormat.Currency;

            ChartSeries dep1Series = new ChartSeries();
            dep1Series.Type = ChartSeriesType.Bar;
            dep1Series.Name = "Department 1";

            dep1Series.AddItem(100000, "Company 1: 100.000");
            dep1Series.AddItem(150000, "Company 2: 150.000");
            dep1Series.AddItem(125000, "Company 3: 125.000");
            dep1Series.AddItem(140000, "Company 4: 140.000");
            dep1Series.AddItem(110000, "Company 5: 110.000");

 

            ChartSeries dep2Series = new ChartSeries();
            dep2Series.Type = ChartSeriesType.Bar;
            dep2Series.Name = "Department 2";

            dep2Series.AddItem(140000, "Company 6: 140.000");
            dep2Series.AddItem(110000, "Company 7: 110.000");
            dep2Series.AddItem(100000, "Company 8: 100.000");
            dep2Series.AddItem(150000, "Company 9: 150.000");
            dep2Series.AddItem(125000, "Company 10: 125.000");

            chart.AddChartSeries(dep1Series);
            chart.AddChartSeries(dep2Series);

            dep1Series.Appearance.LabelAppearance.RotationAngle = -90;
            dep2Series.Appearance.LabelAppearance.RotationAngle = -90;

        }

        protected void PrepareChart2(RadChart chart)
        {
            chart.PlotArea.YAxis.Appearance.ValueFormat = ChartValueFormat.Currency;
            chart.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.None;
            chart.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = -90;
            chart.PlotArea.XAxis.AutoScale = false;

            chart.PlotArea.XAxis.Items.Clear();

            ChartSeries chartSeries = new ChartSeries();
            chartSeries.Name = "Turnover total: 400.000€";
            chartSeries.Type = ChartSeriesType.Line;
            chartSeries.Appearance.LabelAppearance.RotationAngle = -90;
            chartSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.SeriesName;

            chartSeries.AddItem(150000, "EUR 150.000");
            chart.PlotArea.XAxis.Items.Add(new ChartAxisItem("01.2008"));

            chartSeries.AddItem(125000, "EUR 125.000");
            chart.PlotArea.XAxis.Items.Add(new ChartAxisItem("02.2008"));

            chartSeries.AddItem(170000, "EUR 170.000");
            chart.PlotArea.XAxis.Items.Add(new ChartAxisItem("03.2008"));

            chartSeries.AddItem(165000, "EUR 165.000");
            chart.PlotArea.XAxis.Items.Add(new ChartAxisItem("04.2008"));

            chartSeries.AddItem(70000, "EUR 70.000");
            chart.PlotArea.XAxis.Items.Add(new ChartAxisItem("05.2008"));

            chart.AddChartSeries(chartSeries);
            chart.Legend.Visible = true;
        }

        protected void PrepareChart3(RadChart chart)
        {
            chart.Legend.Visible = false;
            ChartSeries chartSeries = new ChartSeries();
            chartSeries.Name = "Turnover total: EUR 100.000";
            chartSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing;
            chartSeries.Type = ChartSeriesType.Pie;
            chartSeries.Appearance.StartAngle = -90;
            chartSeries.Appearance.ShowLabelConnectors = true;
            chartSeries.Appearance.DiameterScale = 0.6;
            chart.PlotArea.YAxis.Appearance.ValueFormat = ChartValueFormat.Percent;
            chart.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.Currency;

            double sumPercent = 100;
            double sumValue = 100000;

            for (int i = 1; i < 3; ++i)
            {
                string label = string.Format("{0}: {1} {2:N2} ({3:N2}%)", "Customer " + i.ToString(), "EUR", (24 + i) * 1000, 24 + i);
                chartSeries.AddItem(24 + i, label, _pieChartColors[i % _pieChartColors.Length]);
                sumPercent -= 24 + i;
                sumValue -= (24 + i) * 1000;
            }

            for (int i = 1; i < 9; ++i)
            {
                double d = (12 - i) / 2;
                string label = string.Format("{0}: {1} {2:N2} ({3:N2}%)", "Customer " + (i + 2).ToString(), "EUR", d * 1000, d);
                chartSeries.AddItem(d, label, _pieChartColors[i % _pieChartColors.Length]);
                sumPercent -= d;
                sumValue -= d * 1000;
            }

            chartSeries.AddItem(sumPercent, string.Format("Remain: EUR {0:N2} ({1:N2}%)", sumValue, sumPercent), Color.Pink, true);

            chart.AddChartSeries(chartSeries);
            chartSeries.Appearance.TextAppearance.MaxLength = 150;

        }
    }
}


//***************************************

There may be some properties to change the look of labels, we do not know by now. The documentation in some cases is still very rare ;-)
Hope u can help.

Thanx,
Daniel


P.S.: While writing this forum post, I pasted some content into this editor window. An askbox occured, asking me if I want to allow pasting into this window (In German: Möchten Sie zulassen, dass Informationen aus der Zwischenablage in diese Seite eingefügt werden?). If I said "No" the pasted content anyhow sometimes appeared, but appeared everytime when I pasted twice (and answered "No").
Vladimir Milev
Telerik team
 answered on 23 Apr 2010
1 answer
109 views
Hi, i am facing a problem in RadScheduler :
Can i have this kind of arrangement in RadScheduler ?

                -----------------------------------------------------------
                      Date 1                         |    Date 2                      
                 ----------------------------------------------------------------------
                    7am        | 1pm               | 7am           | 7pm
Resource

My coding is as below   :
 
            Dim cResourceType As New Telerik.Web.UI.ResourceType 
 
            cResourceType.DataSource = getLineName() 
 
            cResourceType.Name = "Line" 
            cResourceType.KeyField = "LineNum" 
            cResourceType.TextField = "LineName" 
            cResourceType.ForeignKeyField = "LineNum" 
            RadScheduler1.ResourceTypes.Add(cResourceType) 
 
 
 
            RadScheduler1.GroupBy = "Line,Date" 
 
 
            RadScheduler1.GroupingDirection = GroupingDirection.Vertical 
            RadScheduler1.SelectedView = SchedulerViewType.MultiDayView 
 
            RadScheduler1.TimeLabelRowSpan = 12 '10 '23 ' 12 '24 
            RadScheduler1.DayStartTime = TimeSpan.Parse("07:00:00") 
            RadScheduler1.DayEndTime = TimeSpan.Parse("23:59:59") 
            RadScheduler1.MinutesPerRow = 60 
 
            RadScheduler1.WorkDayStartTime = TimeSpan.Parse("00:00:00") 
            RadScheduler1.WorkDayEndTime = TimeSpan.Parse("23:59:59") 
 
            RadScheduler1.ShowFooter = False 
 
            'RadScheduler1.DayEndTime = TimeSpan.Parse(DayEnd.SelectedValue) 
            'RadScheduler1.TimelineView.NumberOfSlots = 1 
 
            RadScheduler1.SelectedDate = mdsResult.Tables(0).Rows(0)("StartDate") 
            RadScheduler1.DataSource = mdsResult 
            RadScheduler1.DataBind() 

Attach here is the output of my coding:

Peter
Telerik team
 answered on 23 Apr 2010
1 answer
84 views
I am attempting to use the RadSpell control for validating passwords selected by users.  I want to make sure the password selected by the user is not in the dictionary (in addition to other validations I am also performing).

How do I fire up RadSpell on the server-side, pass a word into it, and return whether the word is in the dictionary or not?

Can someone provide a function that does that?

Thanks in advance!
Rumen
Telerik team
 answered on 23 Apr 2010
1 answer
69 views
The graphic shown when the loading panel is in 'wait' mode has changed from the 2009 release - it seems that the background square is no longer transparent. Is there anyway to get the 'old' one back?
Dimo
Telerik team
 answered on 23 Apr 2010
1 answer
131 views
Hi,
I have a problem with the load time of the scheduler.
On my pc with IIS and local SQL server database it takes 20 s to load. I am sure this is going to double or triple when going live with remote web servers and databses.

In this application I am using scheduler with master pages and the load time is very critical. I have tried the following to try to optimize the time on the usage of the scheduler
1. filter appointments in the stored procedures for only what is shown on the screen, as per the day, week, month...view
2. used a rad windwow to reduce the HTML codes on the rad scheduler. This not using the Edit and Insert apointment inbuilt panels...

These 2 solutions have helped  a lot but I am unable to optimize the time whn the application first loads.

My question are:
1. Is there general way to optimize the load time of schduler..e.g..best practices..etc?
2. Are there any known issues that affect the load time of the rad scheduler when used with master pages?

Thanks for your reply,
swad
Peter
Telerik team
 answered on 23 Apr 2010
1 answer
113 views

I have a problem using the RadTreeView which i can't figure out.

I want to create a treeview and load the content runtime as it changes depending on a selection made from a DropDownList.

I have no problem by loading the content, the problem is the styleing which i can't figure out how to control when loading the content runtime.

My HTML looks like this

<Telerik:RadTreeView runat="server" id="uiRadTreeView" Skin="Vista" Width="400px" > 
      
</Telerik:RadTreeView> 

My Code Behind looks like this

  uiRadTreeView.Nodes.Clear();     
    
            SPQuery manualQuery = new SPQuery();     
            manualQuery.Query = @"<Where><Eq><FieldRef Name='Client' /><Value Type='Lookup'>"+ uiClients.SelectedItem.Text +"</Value></Eq></Where>";     
    
            XmlDocument xmlDoc = new XmlDocument();     
    
            // Write down the XML declaration     
            XmlDeclaration xmlDeclaration = xmlDoc.CreateXmlDeclaration("1.0", "utf-8", null);     
    
            // Create the root element     
            XmlElement rootNode = xmlDoc.CreateElement("Tree");     
            xmlDoc.InsertBefore(xmlDeclaration, xmlDoc.DocumentElement);     
            xmlDoc.AppendChild(rootNode);                 
    
            SPListItemCollection manuals = SPContext.Current.Web.Lists["Manual"].GetItems(manualQuery);     
                 
            foreach (SPListItem manual in manuals)     
            {     
                     
                XmlElement parentNode = xmlDoc.CreateElement("Node");     
                     
                parentNode.SetAttribute("Text", manual.Title);                              
    
                SPFieldLookupValueCollection sops = new SPFieldLookupValueCollection(manual["SOP"].ToString());     
                     
                foreach (SPFieldLookupValue sop in sops)     
                {     
                    XmlElement childNode = xmlDoc.CreateElement("Node");     
                    childNode.SetAttribute("Text", sop.LookupValue.ToString());     
                    parentNode.AppendChild(childNode);     
                }     
    
                xmlDoc.DocumentElement.AppendChild(parentNode);     
            }     
    
               
    
            uiRadTreeView.LoadXml(xmlDoc.InnerXml);    
 

My Screen looks like see this link http://screencast.com/t/MDYxNTU5MzY

as yo can see from the screenshot i can't see the childnodes. When clicking on the Parent node the child nodes is rendered to the right. How do i force the childnodes to be rendered to the left ?

also how can i change the styling when adding content at runtime ?

thanks for your help

Kamen Bundev
Telerik team
 answered on 23 Apr 2010
1 answer
101 views
Hi,
    I have a Telerik Radgrid in one search page.actually what is happening is once we enter some search criteria in text box and press enter button focus is going to Radgrid filter automatically and its show filter options.I dont want this to happen.Plese help me to remove the focus going to the grid.

Thanks
Sambhav
Sebastian
Telerik team
 answered on 23 Apr 2010
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?