Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
162 views
Hi , 

I am trying to display line chart dynamically and get displayed in my panel. I don't understand what I am doing wrong. Please help.

I have this in my .aspx file
      <asp:Panel ID="Panel3" runat="server"  style="float:left;width:45%;">
             <telerik:RadHtmlChart ID="RadHtmlChart3"  runat="server" ChartTitle-Text="Dynamic Line Series">
             </telerik:RadHtmlChart>         
      </asp:Panel>

and the following code in aspx.cs file
 if (DropDownList1.SelectedValue == "Line")
        {
            SqlConnection sqlConn3 = new SqlConnection(ConfigurationManager.ConnectionStrings["xxxx"].ConnectionString);
            SqlCommand SqlCmd3 = new SqlCommand("Select ST as state, count(*) as no_of_cust FROM CUSTOMER group by ST", sqlConn3);
            SqlCmd3.Connection.Open();
            SqlDataReader reader3 = SqlCmd3.ExecuteReader();

            DataTable dt = new DataTable();
            dt.Columns.Add("State_col");
            dt.Columns.Add("No_Customers");
            if (reader3.HasRows)
            {
                while (reader3.Read())
                {
                    dt.Rows.Add(reader3.GetValue(0).ToString(), reader3.GetInt32(1));
                }
            }

            var columns = new List<string>();
            for (int i = 0; i < reader3.FieldCount; i++)
            {
                columns.Add(reader3.GetName(i));
            }
            RadHtmlChart3.ChartTitle.Text = "My dynamic Line Chart";
            RadHtmlChart3.ChartTitle.Appearance.Align = Telerik.Web.UI.HtmlChart.ChartTitleAlign.Center;
            RadHtmlChart3.ChartTitle.Appearance.Position = Telerik.Web.UI.HtmlChart.ChartTitlePosition.Top;
            RadHtmlChart3.Legend.Appearance.BackgroundColor = System.Drawing.Color.White;
            RadHtmlChart3.Legend.Appearance.Position = Telerik.Web.UI.HtmlChart.ChartLegendPosition.Bottom;
            RadHtmlChart3.PlotArea.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.White;
 //           RadHtmlChart3.PlotArea.XAxis.Color = System.Drawing.Color.Azure;
            RadHtmlChart3.PlotArea.XAxis.MajorTickType = Telerik.Web.UI.HtmlChart.TickType.Outside;
            RadHtmlChart3.PlotArea.XAxis.MinorTickType = Telerik.Web.UI.HtmlChart.TickType.Outside;
            RadHtmlChart3.PlotArea.XAxis.Reversed = false;
            RadHtmlChart3.PlotArea.XAxis.DataLabelsField = columns[0];

            RadHtmlChart3.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.White;
            RadHtmlChart3.PlotArea.YAxis.LabelsAppearance.DataFormatString = "{0}";
            RadHtmlChart3.PlotArea.YAxis.LabelsAppearance.RotationAngle = 0;
            RadHtmlChart3.PlotArea.YAxis.LabelsAppearance.Color = System.Drawing.ColorTranslator.FromHtml("#000000");
            RadHtmlChart3.PlotArea.YAxis.MajorGridLines.Color =  System.Drawing.ColorTranslator.FromHtml("#EFEFEF");
            RadHtmlChart3.PlotArea.YAxis.MinorGridLines.Color = System.Drawing.ColorTranslator.FromHtml("#F7F7F7");
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.Position = Telerik.Web.UI.HtmlChart.AxisTitlePosition.Center;
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.RotationAngle = 0;
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.Text = columns[1];
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.TextStyle.Color = System.Drawing.ColorTranslator.FromHtml("#000000");
            RadHtmlChart3.PlotArea.XAxis.TitleAppearance.Text = columns[0];
            RadHtmlChart3.PlotArea.YAxis.TitleAppearance.Text = columns[1];

           ScatterLineSeries slineSeries = new ScatterLineSeries(); 
            slineSeries.LabelsAppearance.Visible = false;
            slineSeries.LabelsAppearance.Position = Telerik.Web.UI.HtmlChart.LineAndScatterLabelsPosition.Below;
            slineSeries.LabelsAppearance.DataFormatString = "{0}%";
            slineSeries.TooltipsAppearance.DataFormatString = "{0}%";
            slineSeries.DataFieldX = columns[0];
            slineSeries.DataFieldY = columns[1];
         
           RadHtmlChart3.PlotArea.Series.Add(slineSeries);
            RadHtmlChart3.DataSource = reader3;
            RadHtmlChart3.DataBind();
   }
}


Thank you
    







Danail Vasilev
Telerik team
 answered on 12 Aug 2014
5 answers
637 views
I have searched the forums and google to try and figure this out but I am at a loss, any help is much
appriciated.

Problem is when the content page is not in the same folder as the masterpage, the rad controls stop working

Folder structure
WebApplication
       Site1.Master  - contains radtreeview
Admin
    WebForm1.aspx  - blank content page
In this example the radtreeview in master page stops working, the javascript seems to be the problem,
no client side features work, not even just the default expand collapse

If I put the master page and the content page in the same directory all works as expected.

An example page that is not working can be viewed here
http://simplyfundraising.ageektech.com/webapplication/admin/webform1.aspx

Thank you.
      

Sunit
Top achievements
Rank 1
 answered on 12 Aug 2014
1 answer
237 views
I have a aspx web form which contain RadWindow manager with multiple windows in it.  When I open up window via the radwindow manager it seems it won't "affect" the session timer within the "parnet" aspx web form.  How can I make it so that when there is a ajax call or a page refresh, within the radwindow, it will refresh the session timer of the "parent" web form?  

The issue is that the user think that they are still using the web page, but yet they keep getting kick off when session expires on the "parent" web form.

Thank you!

Marin Bratanov
Telerik team
 answered on 12 Aug 2014
2 answers
381 views
I have seen a couple of postings that seem to be related to this issue, but with no definitive answer.

I have a RadComboBox (in ASP.NET) with runat=server and AutoPostBack=true.  I have a handler for OnSelectedIndexChanged.  

The handler fires when the user selects an item with the mouse.  The handler doesn't fire when the focus is on the control and the user changes the selection using the keyboard (arrow up/down).  

The handler will execute in this case when the control loses focus, but that's not the desired behavior.  We have sections of the page that will be shown/hidden based on the user's selection, so the user expects those changes to happen as their selection changes.

What's the official position on how to handle this? 

My version of Telerik.Web.UI.dll is 2013.1.417.35.

Thanks,

David Cater
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2014
3 answers
349 views
I have a page that has links to pop up help documents in a radwindow.  The issue I want to resolve is if a user clicks a link more then one time I don't want multiple radwindows with the same help information.  Is there a way to prevent the same link from opening multiple times?

Here is the code i'm using to load the radwindow

  <script type="text/javascript">
    function GetRadWindow() {
      var oWindow = null; if (window.radWindow)
        oWindow = window.radWindow; else if (window.frameElement.radWindow)
          oWindow = window.frameElement.radWindow; return oWindow;
    }

    function radWin(myurl)
    {
      var oManager = GetRadWindow().get_windowManager();
      setTimeout(function () {
        oManager.open(myurl);
      }, 0);
    }
  </script>

Part of datagrid
<ItemTemplate>
    <%# DataBinder.Eval(Container.DataItem,"Path")%><a href="javascript:radWin('../temp.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"ID")%>')"><img src='../Images/Info.gif' border=0 alt="" /></a>
</ItemTemplate>

Thank you
Shinu
Top achievements
Rank 2
 answered on 12 Aug 2014
3 answers
185 views
I am trying to utilize the RadImageEditor in my software. I dragged the control from the toolbox into my webpage. Here is my code.

<telerik:RadImageEditor ID="RadImageEditor1" runat="server" ToolBarMode="Default" Skin="Default"
     Width="820px" Height="490px">
</telerik:RadImageEditor>

I ran the website but I am not seeing any of the icons in the toolbar. See image below:
David
Top achievements
Rank 1
 answered on 12 Aug 2014
4 answers
153 views
Hello

Im trying to fire a simple onclientnodeclicking event on my treeview via keyboard (hitting enter).

But I find that upon pressing Enter on the node, besides firing the onclientnodeclicking event, also  fires a postback on a Button1 situated on the same page.
How do I prevent this?

Using the mouseClick on the treenode works as expected, without Button1 postback.

Simple example to illustrate:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">

        function NodeClick(sender, eventArgs) {           
           var node = eventArgs.get_node();
           alert(node.get_text());
          // eventArgs.set_cancel(true);                    
        }    
        
    </script>


</head>

<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>       
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click"  TabIndex="1" />
   <br /><br />
    <telerik:RadTreeView ID="RadTreeView1" Runat="server" Width="200px" Height="200px"  TabIndex="2"
        onclientnodeclicking="NodeClick" ResolvedRenderMode="Classic">
        <Nodes>
            <telerik:RadTreeNode runat="server" PostBack="False" Text="Root RadTreeNode1">
            </telerik:RadTreeNode>
            <telerik:RadTreeNode runat="server" PostBack="False" Text="Root RadTreeNode2">
            </telerik:RadTreeNode>
            <telerik:RadTreeNode runat="server" PostBack="False" Text="Root RadTreeNode3">
            </telerik:RadTreeNode>
        </Nodes>
    </telerik:RadTreeView> 
    
    </div>
    </form>
</body>
</html>

Mark
Top achievements
Rank 1
 answered on 11 Aug 2014
2 answers
112 views
Hello,

My customers would like to combine the column titles with checklist filtering. They would like to eliminate the textbox and display only the checklist button next to the column title as shown in the attached image. I realize that Radgrid does not have any built in ability to do this, but is there a way to customize it using code behind and/or client side scripting? If so, can you provide, or point me to an existing example?

Thanks,
~Sonny
Sonny
Top achievements
Rank 1
 answered on 11 Aug 2014
1 answer
82 views
Hello,

I'm developing for DotNetNuke and would like design support, however the needed dll's for this feature are not present in a DNN install.  My account will not allow me to download the version of the Telerik design dll I need which is 2013.2.717.40.

Upgrading the telerik controls in dnn to the version I do have results in some incompatibilities.

Any way of obtaining the necessary dll's for design support?
Joseph
Telerik team
 answered on 11 Aug 2014
1 answer
194 views
It may sound like a ridiculous question, but here is my thought. I need to convert a very complicated completely dynamic site to responsive design. It might be a hard sell to ask the team leader if i can start the shell from scratch with RadPageLayout, BUT if i could cut my teeth by using RadPageLayout in some of the larger sections, I'll bet i could sell the concept of the whole thing. For specifics, if i had three large divs, going vertically down the page, could i make the 2nd and 3rd ones each contain there own unique RadPageLayout control?
Nencho
Telerik team
 answered on 11 Aug 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?