Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
720 views
I am trying to plot a chart where datapoint ( x, y ) are as-
(datetime, number)

datetime is always in the format of "01-Month-Year"  i.e.  date part is always first of month
While adding X-axis range I am trying to use-

RadChart.PlotArea.XAxis.AddRange(dtBegin.ToOADate(), dtEnd.ToOADate(), 31);

 

RadChart.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Inside;
RadChart.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.ShortDate;
RadChart.PlotArea.XAxis.Appearance.CustomFormat = "dd MMM yyyy";
RadChart.PlotArea.XAxis.AddRange(dtBegin.ToOADate(), dtEnd.ToOADate(), 31);


The problem with above code  is that steps of 31 means that  since not all month has 31 days we will end up with x-axis data point which will not  be in 01-Month-Year format.

what I want on x-axis is like this

01-Nov-2010
01-Dec-2010
01-Jan-2011
01-Feb-2011
01-Mar-2011
01-Apr-2011
01-May-2011
01-Jun-2011
01-Jul-2011
01-Aug-2011
01-Sep-2011
01-Oct-2011
01-Nov-2011
01-Dec-2011
01-Jan-2012
01-Feb-2012
01-Mar-2012
01-Apr-2012
01-May-2012
01-Jun-2012
01-Jul-2012
01-Aug-2012
01-Sep-2012
01-Oct-2012

 what I get is something as shown in attached image.

How can I add date alone x-axis with steps of 1 month.


Richard
Top achievements
Rank 1
 answered on 05 Jan 2012
1 answer
57 views
I have a RadGrid in a dynamically loaded user control. When the page that hosts the user control is initially loaded the RadGrid does not appear. I have to click some buttons that are configured via a RadAjaxManagerProxy on the user control to update the RadGrid before it appears. Once the RadGrid has appeared all operations behave normally. Any ideas on how to display it on the initial page load??
Pavlina
Telerik team
 answered on 05 Jan 2012
4 answers
79 views
I have implemented the search in rad combo, on writing the some text in drop down it fetch data from server using itemrequested event.
it is working in all the browser except IE9

 <telerik:RadComboBox ID="ddlHIPOs" NoWrap="true" Visible="false" runat="server" DropDownWidth="320px"
                MarkFirstMatch="false" EnableLoadOnDemand="true" CssClass="HIPOCandidateDropDown"
                DropDownCssClass="HIPOCandidateDropDown" AppendDataBoundItems="false" ItemsPerRequest="8"
                EnableViewState="true" Width="200px" expandeffect="Slide" AllowCustomText="true"
                OnItemsRequested="ddlHipos_ItemsRequested" OnClientDropDownOpening="SaveText"
                OnClientDropDownClosing="SetText" ItemRequestTimeout="500" OnClientItemsRequesting="HandleRequestStart"
                OnClientItemsRequestFailed="HandleRequestFailed">
                <itemtemplate>

 </itemtemplate>
</telerik:RadComboBox>


Ivana
Telerik team
 answered on 05 Jan 2012
6 answers
139 views
I have a RadGrid (v2009.2.701.35) using the Web20 theme.  In my attached screen shot, the grid in the upper half is the grid with the default horizontal text in the header.  Notice the uniform borders between all of the header columns.  The grid in the lower half is a result of changing the header text to render vertically.  Now notice the difference in column widths between columns 1 & 2 vs columns 2 & 3 or 3 & 4.  Is there any way to get uniform header column borders with vertical header text?  Here's my CSS tweak w/ changes in bold:

.RadGrid_Web20 .rgHeader, .RadGrid_Web20 .rgHeader  a
{
    color: #ffffff !important;
    font-family: Arial !important;
    font-size: 8pt !important;
    font-weight: bold !important;
    text-decoration: none;
    text-align: left;
    border-color: #FFFFFF !important;
    writing-mode: tb-rl !important;  
    filter: flipV flipH !important; 
}
Rob
Top achievements
Rank 1
 answered on 05 Jan 2012
1 answer
87 views
Hello team,

We are using telerik charting .We have used below code for generating chart.When we are using below code we get error in stack area and stack line chart.

please find attached screen shot for error.
how can i use below code for pie chart because i am not able to generate pie chart using below code.we have two columns for pie chart x-axis and category.
 
Code:
           SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["ChartconnectionString"].ConnectionString);
            cn.Open();
            SqlCommand cmd = new SqlCommand(query, cn);
            SqlDataAdapter sda = new SqlDataAdapter();
            sda.SelectCommand = cmd;
            DataTable data = new DataTable();
            sda.Fill(data);
          RadChart1.DataSource = data;
 

         RadChart1.DataManager.ValuesYColumns = new string[] { rcbyaxis.SelectedItem.Text };//Y-axis column
        RadChart1.PlotArea.XAxis.DataLabelsColumn = rcbxaxis.SelectedItem.Text;//X-axis column

         RadChart1.DataGroupColumn = rcbCategory.SelectedItem.Text;//Category column for stack chart
            RadChart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 300;
            RadChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color =
            System.Drawing.Color.BlueViolet;
            RadChart1.PlotArea.Appearance.Dimensions.Margins.Bottom =
            Telerik.Charting.Styles.Unit.Percentage(30);
            switch (rcbChartType.SelectedValue)
            {
                case "BAR":
                    RadChart1.Chart.DefaultType = ChartSeriesType.Bar;
                    break;
                case "Line":
                    RadChart1.Chart.DefaultType = ChartSeriesType.Line;
                    break;
                case "Area":
                    RadChart1.Chart.DefaultType = ChartSeriesType.Area;
                    break;
                case "Stacked Bar":
                    RadChart1.Chart.DefaultType = ChartSeriesType.StackedBar;
                    break;
                case "Stacked Line":
                    RadChart1.Chart.DefaultType = ChartSeriesType.StackedLine;
                    break;
                case "Stacked Area":
                    RadChart1.Chart.DefaultType = ChartSeriesType.StackedArea;
                    break;
                case "Stacked Bar 100%":
                    RadChart1.Chart.DefaultType = ChartSeriesType.StackedBar100;
                    break;
                case "Stacked Area 100%":
                    RadChart1.Chart.DefaultType = ChartSeriesType.StackedArea100;
                    break;
                case "Pie":
                    RadChart1.Chart.DefaultType = ChartSeriesType.Pie;
                    break;
            }
            // bind to the datasource
            RadChart1.DataBind();
 

please help me as soon as possible.
Thanks.
Richard
Top achievements
Rank 1
 answered on 05 Jan 2012
3 answers
91 views

Hi,

I've my design as follows....attached herewith the screenshot also....

 <table>
                                                                <tr>
                                                                    <td id="Td1">
                                                                        <span class="smallTitle">Column Repeat</span><br />
                                                                        <telerik:RadComboBox ID="uxCheckboxChoicesColumnRepeat1" runat="server" OnClientSelectedIndexChanged="CheckBoxChoicesColumnRepeatChanged1">
                                                                            <Items>
                                                                                <telerik:RadComboBoxItem Text="One Column" Value="1" />
                                                                                <telerik:RadComboBoxItem Text="Two Columns" Value="2" />
                                                                                <telerik:RadComboBoxItem Text="Three Columns" Value="3" />
                                                                                <telerik:RadComboBoxItem Text="Four Columns" Value="4" />
                                                                            </Items>
                                                                        </telerik:RadComboBox>
                                                                    </td>
                                                                </tr>
                                                                 <tr>
                                                                    <td>
                                                                        <asp:Panel runat="server" ID="uxJumpPanel">
                                                                            <telerik:RadListView ID="feeldChoices" runat="server" OnItemDataBound = "feeldChoices_ItemDataBound" >
                                                                                <ItemTemplate>
                                                                                    <table cellpadding="0" cellspacing="0">
                                                                                        <tr>
                                                                                            <td>
                                                                                                <telerik:RadTextBox runat="server" Text='<%# Eval("Text") %>' onkeyup="SyncListToCheckbox(this)"
                                                                                                    ID="uxItemText" Width="260">
                                                                                                </telerik:RadTextBox>
                                                                                                  <telerik:RadComboBox runat="server" ID="uxSelectPage1" ></telerik:RadComboBox>
                                                                                            </td>

                                                                                            <td>
                                                                                                <img id="imageAdd" style="cursor: pointer" runat="server" onclick="InitiateAjaxRequest('1,3,add|' + this.id + ',' + selectedDockId); SetUnsaved();"
                                                                                                    alt="Add field choice" border="0" src="Images/Add.png" />
                                                                                            </td>
                                                                                            <td>
                                                                                                <img id="imageDelete" style="cursor: pointer" runat="server" onclick="InitiateAjaxRequest('1,3,remove|' + this.id + ',' + selectedDockId); SetUnsaved();"
                                                                                                    alt="Delete field choice" border="0" src="Images/Delete.png" />
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </ItemTemplate>
                                                                            </telerik:RadListView>
                                                                        </asp:Panel>
                                                                    </td>
                                                                </tr>
                                                             
                                                            </table>
my intention is, when i click the edit button all the 3 radcombobox (uxSelectPage1) should display the already saved data.
 I tried Itemdatabound its not working for me...any other solution.

//Thanks

Ivana
Telerik team
 answered on 05 Jan 2012
1 answer
59 views
Verison: Telerik RadControls for ASP.NET AJAX Q2 2011 SP1
Platform: v3.5 framework. vs2010, asp.net c#

1. Is it possible to pre-fix the crop tool such that ... the user only see the crop-frame and cannot edit the size of crop?
2. how to proportional resize the image onload such that the image meet minimum size in term of width and height (px), same as above the user is not allow to edit the pre-setting?
Dobromir
Telerik team
 answered on 05 Jan 2012
5 answers
269 views
Hi,

I'm experiencing a weird issue in radeditor (v2010.2.826.35) in my aspx pages. Following message appears just under the editor in preview mode:
RadEditor - please enable JavaScript to use the rich text editor

I checked and find that some <noscript> tag gets added to the editor which displays this message.

I tried removing it, but failed.

Can you please suggest on why this is happening and how to get rid of it?


Sumit
 
Rumen
Telerik team
 answered on 05 Jan 2012
1 answer
88 views
Hi,

Is it possible to access the loading panel used when refreshing the file explorer grid? I want to be able to change its zindex.

Thanks in advance,
Michael Pinheiro
Dobromir
Telerik team
 answered on 05 Jan 2012
1 answer
102 views
I have this ASPX code:

<telerik:RadComboBox runat="server" ID="instituicao" Width="450" CheckBoxes="true"
        AutoPostBack="true" ItemsPerRequest="10"
        EnableLoadOnDemand="True" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
        OnItemChecked="instituicao_ItemChecked" OnItemsRequested="instituicao_ItemsRequested" />

And this code behind:
protected void instituicao_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
    DataTable dt = GetData();
    int total = dt.Rows.Count;
    int itemOffset = e.NumberOfItems;
    int endOffset = Math.Min(itemOffset + instituicao.ItemsPerRequest, total);
    e.EndOfItems = endOffset == total;
    instituicao.Items.AddRange(
        dt.Rows.OfType<DataRow>().Skip(itemOffset).Take(endOffset - itemOffset)
               .Select(i => new RadComboBoxItem(i["Id"] as string, i["Id"] as string)));
}
 
protected void instituicao_ItemChecked(object sender, RadComboBoxItemEventArgs e)
{
    // do stuff
}
 
private DataTable GetData()
{
    DataTable dt = new DataTable();
    dt.Columns.Add("Id", typeof(string));
    for (int i = 1; i <= 100; i++ )
    {
        DataRow row = dt.NewRow();
        row["Id"] = i;
        dt.Rows.Add(row);
    }
     return dt;
}

When I check an item I got this error and my code is never executed:
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Collections.ArrayList.get_Item(Int32 index) +7487944
   System.Web.UI.StateManagedCollection.System.Collections.IList.get_Item(Int32 index) +12
   Telerik.Web.UI.ControlItemCollection.get_Item(Int32 index) +48
   Telerik.Web.UI.RadComboBoxItemCollection.get_Item(Int32 index) +37
   Telerik.Web.UI.RadComboBox.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +238
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Any clues?
Kalina
Telerik team
 answered on 05 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?