Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
310 views
<%@ Import Namespace="System.Data.Odbc" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="System.Security.Principal" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="DocumentFormat.OpenXml" %>
<%@ Import Namespace="DocumentFormat.OpenXml.Presentation" %>
<%@ Import Namespace="DocumentFormat.OpenXml.Packaging" %>
<%@ Import Namespace="DocumentFormat.OpenXml.Drawing" %>
 
 
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
 
<head id="Head1" runat="server">
<title>Chart</title>
<script runat="server">  
 
 
   private void Page_Load(object sender, System.EventArgs e)
   {
        
       OdbcConnection myConnectionString = new OdbcConnection(ConfigurationManager.ConnectionStrings["ConnMySQL"].ConnectionString);
       myConnectionString.Open();
 
       String strQuery = " SELECT AAA, BBB, CCC, DDD, EEE, myDates from myTbl; ";
 
       OdbcCommand objCmd = new OdbcCommand(strQuery, myConnectionString);
       objCmd.CommandType = CommandType.Text;
       objCmd.CommandText = strQuery;
 
      
       Chart1.DataSource = objCmd.ExecuteReader();      
        
       Chart1.ChartAreas["ChartArea1"].Area3DStyle.Inclination = 0;
       Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = false;
       Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Angle = -35;
       Chart1.ChartAreas["ChartArea1"].AxisX.IsLabelAutoFit = false;
       Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Font = new System.Drawing.Font("Arial", 8);
       Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.IsStaggered = false;
       Chart1.ChartAreas["ChartArea1"].AxisX.LabelStyle.Enabled = true;
       Chart1.ChartAreas["ChartArea1"].AxisX.IsMarginVisible = true;
       Chart1.ChartAreas["ChartArea1"].AxisX.LineColor = Color.Black;
       Chart1.ChartAreas["ChartArea1"].AxisY.LineColor = Color.Black;
       Chart1.ChartAreas["ChartArea1"].AxisX.LineDashStyle = ChartDashStyle.Solid;
       Chart1.ChartAreas["ChartArea1"].AxisX.LineWidth = 3;
       Chart1.ChartAreas["ChartArea1"].AxisY.LineWidth = 3;
       Chart1.AntiAliasing = AntiAliasingStyles.All;
       Chart1.TextAntiAliasingQuality = TextAntiAliasingQuality.High;
 
 
       Chart1.Series["Default"].XValueMember = "AAA";
       Chart1.Series["Default"].YValueMembers = "BBB";
       Chart1.Series["Default"].ChartType = SeriesChartType.Column;
       Chart1.Series["Default"]["PointWidth"] = "0.7";
       Chart1.Series["Default"].IsValueShownAsLabel = true;
       Chart1.Series["Default"]["BarLabelStyle"] = "Center";
       Chart1.Series["Default"]["PixelPointDepth"] = "99";
       Chart1.Series["Default"]["DrawingStyle"] = "Cylinder";
       Chart1.Series["Default"].Font = new System.Drawing.Font("Verdana", 10);
       Chart1.Series["Default"]["LabelStyle"] = "Top";
 
       Chart1.Series["Default2"].YValueMembers = "CCC";
       Chart1.Series["Default2"].ChartType = SeriesChartType.Column;
       Chart1.Series["Default2"]["LabelStyle"] = "Center";
       Chart1.Series["Default2"]["PointWidth"] = "0.7";
       Chart1.Series["Default2"].IsValueShownAsLabel = true;
       Chart1.Series["Default2"].Font = new System.Drawing.Font("Verdana", 10);
       Chart1.Series["Default2"]["LabelStyle"] = "TopLeft";
       Chart1.Series["Default2"]["BarLabelStyle"] = "Center";
       Chart1.Series["Default2"]["PixelPointDepth"] = "99";
       Chart1.Series["Default2"]["DrawingStyle"] = "Cylinder";
 
        
       Chart1.Series["Default3"].YValueMembers = "DDD";
       Chart1.Series["Default3"].ChartType = SeriesChartType.Line;
       Chart1.Series["Default3"].Font = new System.Drawing.Font("Verdana", 12);
       Chart1.Series["Default3"]["LabelStyle"] = "TopLeft";
 
       Chart1.Series["Default4"].YValueMembers = "EEE";
       Chart1.Series["Default4"].ChartType = SeriesChartType.Column;
       Chart1.Series["Default4"]["PointWidth"] = "0.7";
       Chart1.Series["Default4"].IsValueShownAsLabel = true;
       Chart1.Series["Default4"]["BarLabelStyle"] = "Center";
       Chart1.Series["Default4"]["PixelPointDepth"] = "99";
       Chart1.Series["Default4"]["DrawingStyle"] = "Cylinder";
       Chart1.Series["Default4"].Font = new System.Drawing.Font("Verdana", 10);
       Chart1.Series["Default4"]["LabelStyle"] = "Top";
 
       Chart1.Legends.Add(new Legend("Default"));
       Chart1.Series["Default"].Legend = "Default";
       Chart1.Legends["Default"].BackColor = Color.MediumSeaGreen;
       Chart1.Legends["Default"].BackSecondaryColor = Color.Green;
       Chart1.Legends["Default"].BackGradientStyle = GradientStyle.DiagonalLeft;
       Chart1.Legends["Default"].BorderColor = Color.Black;
       Chart1.Legends["Default"].BorderWidth = 2;
       Chart1.Legends["Default"].BorderDashStyle = ChartDashStyle.Solid;
       Chart1.Legends["Default"].ShadowOffset = 2; 
        
       myConnectionString.Close();
       myConnectionString.Dispose();
 
   }  
</script>
 
</head>
<body>
    <form id="form1" runat="server">
    <div>
 
<asp:Chart ID="Chart1" runat="server" Width="1058" Height="680">
<Series>
<asp:Series Name="Default" ChartArea="ChartArea1" Color="MediumOrchid" BorderWidth="2">
</asp:Series>
</Series>
 
<Series>
<asp:Series Name="Default2" ChartArea="ChartArea1" Color="Maroon" BorderWidth="2">
</asp:Series>
</Series>
 
<Series>
<asp:Series Name="Default3" ChartArea="ChartArea1" Color="Red" BorderWidth="4">
</asp:Series>
</Series>
 
<Series>
<asp:Series Name="Default4" ChartArea="ChartArea1" Color="Blue" BorderWidth="2">
</asp:Series>
</Series>
 
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
<AxisX Interval="1">
</AxisX>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
 
    </div>
    </form>
</body>
</html>   


Hi there, I hope your help.

I need in the legend chart:
1) add the date of update of recordset from select query ( field  `myDates` );
2) add the current month previous year;
3) add the current month current year;

I need resolve this problems in chart:
4) the Value Shown As Label in the series "Default4" remains hidden from the series "Default3" (e.g. value 2.96);
5) I change the font color in the "Default2" (e.g. value 14.73).

how can I do that?
thanks
Peshito
Telerik team
 answered on 12 Mar 2012
1 answer
82 views
Hi,

I have once requirement to refresh my grid each 5 second of time, In each row grid has checkboxes through which I select the rows
once grid refresh in 5 seconds, all checkboxes which I checked comes to the unchecked state ( because they are not able to keep there state), Is there any way to keep the state of the checkboxes in client side or serverside so that my rows still be selected once the grid refresh in each 5 second.???
Princy
Top achievements
Rank 2
 answered on 12 Mar 2012
1 answer
112 views
Hello,

I using the following control
<telerik:RadSchedulerRecurrenceEditor ID="RadSchedulerRecurrenceEditor1" runat="server"   />.
I don't want the hourly option in this control.

I also try to used the following function:

function OnClientFormCreated(sender, eventArgs) {
          $telerik.$(".rsRecurrenceOptionList li:first-child").hide();
      }

but i don't see this OnClientFormCreated event in above control. But i found this event in the RadScheduler control.
I attached the image. Please see this.

Please help me as soon as possible.

Thanks

Best Regards

Jiten Mutum


Princy
Top achievements
Rank 2
 answered on 12 Mar 2012
1 answer
80 views
Is it possible to add an extra item to a pie chart legend with the new item as the last one?  I can add an the extra item, but it always appears first.
Giuseppe
Telerik team
 answered on 12 Mar 2012
2 answers
121 views
Hi Team,

I'm using RadTimePicker in ASP.NET Grid. My requirement is need to display start time 30 mins increment and End time 30 decrement in TimeView based on current time in the grid.

Kindly suggest.

Thanks in advance.
Chandrasekhar
Top achievements
Rank 1
 answered on 12 Mar 2012
4 answers
300 views

I am using radlistbox, which i am binding to a data source and contains 430 elements.
Now, radlistbox does not show any vertical/horizontal scrollbar and occupying whole page.
Any suggestion how to display scrollbar is welcome.
Thanks in advance

 

Princy
Top achievements
Rank 2
 answered on 12 Mar 2012
1 answer
64 views
Hi

How can I remove Telerik Radeditor from "Add WebPart" page. I want to restrict user's from using it for sometime. I am not able to find this Web Part in WebPart Gallery.

Stanimir
Telerik team
 answered on 12 Mar 2012
2 answers
128 views
Hi

I'm having problems with a rad grid which has a lot of columns including numeric columns. The grid is set up to scroll horizontally but the filter boxes for the numeric columns don't scroll with the grid. I've included some images of the grid and the set up of my columns below:

<telerik:RadGrid ID="RadGrid1" EnableViewState="true" Height="97%" runat="server"
   AutoGenerateColumns="False" AllowFilteringByColumn="True" AllowSorting="True" CellSpacing="0"
   ShowGroupPanel="True" OnNeedDataSource="RadGrid1_NeedDataSource" AllowMultiRowSelection="True"
   AllowPaging="True" PagerStyle-AlwaysVisible="true" PageSize="50"OnItemCreated="RadGrid1_ItemCreated">
   <ClientSettings>
     <Selecting AllowRowSelect="True" />
     <Scrolling AllowScroll="True" UseStaticHeaders="True" />
   </ClientSettings>
   <MasterTableView CommandItemDisplay="Top">
     <CommandItemSettings ShowAddNewRecordButton="False" />
     <Columns>
       <telerik:GridBoundColumn DataField="Code" HeaderStyle-Width="75px" FilterControlAltText="Filter Code column"
         HeaderText="Code" SortExpression="Code" UniqueName="Code">
       </telerik:GridBoundColumn>
       <telerik:GridCheckBoxColumn DataField="Item" HeaderStyle-Width="75px" DataType="System.Boolean" FilterControlAltText="Filter Item column"
         HeaderText="Item" SortExpression="Item" UniqueName="Item">
       </telerik:GridCheckBoxColumn>
        <telerik:GridTemplateColumn DataField="Title" HeaderStyle-Width="200px"
         HeaderText="Title" Groupable="false" SortExpression="Title" UniqueName="Title">
         <ItemTemplate><asp:label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>'></asp:label>
         </ItemTemplate>
       </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="StringProp1" HeaderStyle-Width="75px" FilterControlAltText="Filter StringProp1 column"
         HeaderText="StringProp1" SortExpression="StringProp1" UniqueName="StringProp1">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="StringProp2" HeaderStyle-Width="75px" FilterControlAltText="Filter StringProp2 column"
         HeaderText="StringProp2" SortExpression="StringProp2" UniqueName="StringProp2">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="StringProp3" HeaderStyle-Width="75px" FilterControlAltText="Filter StringProp3 column"
         HeaderText="StringProp3" SortExpression="StringProp3" UniqueName="StringProp3">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="StringProp4" HeaderStyle-Width="75px" FilterControlAltText="Filter StringProp4 column"
         HeaderText="StringProp4" SortExpression="StringProp4" UniqueName="StringProp4">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="StringProp5" HeaderStyle-Width="75px" FilterControlAltText="Filter StringProp5 column"
         HeaderText="StringProp5" SortExpression="StringProp5" UniqueName="StringProp5">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="StringProp6" HeaderStyle-Width="75px" FilterControlAltText="Filter StringProp6 column"
         HeaderText="StringProp6" SortExpression="StringProp6" UniqueName="StringProp6">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="StringProp7" HeaderStyle-Width="75px" FilterControlAltText="Filter StringProp7 column"
         HeaderText="StringProp7" SortExpression="StringProp7" UniqueName="StringProp7">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="StringProp8" HeaderStyle-Width="75px" FilterControlAltText="Filter StringProp8 column"
         HeaderText="StringProp8" SortExpression="StringProp8" UniqueName="StringProp8">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="StringProp9" HeaderStyle-Width="75px" FilterControlAltText="Filter StringProp9 column"
         HeaderText="StringProp9" SortExpression="StringProp9" UniqueName="StringProp9">
       </telerik:GridBoundColumn>
       <telerik:GridNumericColumn DataField="DoubleProp1" HeaderStyle-Width="75px" DataType="System.Double" FilterControlAltText="Filter DoubleProp1 column"
         HeaderText="DoubleProp1" SortExpression="DoubleProp1" UniqueName="DoubleProp1">
       </telerik:GridNumericColumn>
       <telerik:GridNumericColumn DataField="DoubleProp2" HeaderStyle-Width="75px" DataType="System.Double" FilterControlAltText="Filter DoubleProp2 column"
         HeaderText="DoubleProp2" SortExpression="DoubleProp2" UniqueName="DoubleProp2">
       </telerik:GridNumericColumn>
       <telerik:GridNumericColumn DataField="DoubleProp3" HeaderStyle-Width="75px" DataType="System.Double" FilterControlAltText="Filter DoubleProp3 column"
         HeaderText="DoubleProp3" SortExpression="DoubleProp3" UniqueName="DoubleProp3">
       </telerik:GridNumericColumn>
       <telerik:GridNumericColumn DataField="DoubleProp4" HeaderStyle-Width="75px" DataType="System.Double" FilterControlAltText="Filter DoubleProp4 column"
         HeaderText="DoubleProp4" SortExpression="DoubleProp4" UniqueName="DoubleProp4">
       </telerik:GridNumericColumn>
       <telerik:GridNumericColumn DataField="DoubleProp5" HeaderStyle-Width="75px" DataType="System.Double" FilterControlAltText="Filter DoubleProp5 column"
         HeaderText="DoubleProp5" SortExpression="DoubleProp5" UniqueName="DoubleProp5">
       </telerik:GridNumericColumn>
       <telerik:GridNumericColumn DataField="DoubleProp6" HeaderStyle-Width="75px" DataType="System.Double" FilterControlAltText="Filter DoubleProp6 column"
         HeaderText="DoubleProp6" SortExpression="DoubleProp6" UniqueName="DoubleProp6">
       </telerik:GridNumericColumn>
       <telerik:GridNumericColumn DataField="DoubleProp7" HeaderStyle-Width="75px" DataType="System.Double" FilterControlAltText="Filter DoubleProp7 column"
         HeaderText="DoubleProp7" SortExpression="DoubleProp7" UniqueName="DoubleProp7">
       </telerik:GridNumericColumn>
       <telerik:GridNumericColumn DataField="DoubleProp8" HeaderStyle-Width="75px" DataType="System.Double" FilterControlAltText="Filter DoubleProp8 column"
         HeaderText="DoubleProp8" SortExpression="DoubleProp8" UniqueName="DoubleProp8">
       </telerik:GridNumericColumn>
       <telerik:GridNumericColumn DataField="DoubleProp9" HeaderStyle-Width="75px" DataType="System.Double" FilterControlAltText="Filter DoubleProp9 column"
         HeaderText="DoubleProp9" SortExpression="DoubleProp9" UniqueName="DoubleProp9">
       </telerik:GridNumericColumn>
     </Columns>
   </MasterTableView>
 </telerik:RadGrid >

It also seems to occur with the GridDateTimeColumn as well.

I hope someone can help out.
Regards
Liz
spiketherat
Top achievements
Rank 1
 answered on 12 Mar 2012
1 answer
118 views
Hi,

I have noticed that is possible in code to set the MinDate as greater than the MaxDate on the RadDateTimePicker.  When the aspx is then rendered, an ArgumentOutOfRangeException is thrown.  It is only thrown on the OnPreRender event of the control, and no opportunity is given to catch and handle it without overriding OnPreRender for the control.

Can I ask that the control be changed to make it possible for such exceptions to be caught when the MinDate and MaxDate properties are set?  This seems a much more sensible time to throw such an exception, as it seems quite unusual to have to override prerender to prevent a control from blowing up an entire aspx page?

Craig
Vasil
Telerik team
 answered on 12 Mar 2012
3 answers
115 views
Hi Sir/Mam,

I am facing a weird problem using the Telerik RAD Editor. I am using the control inside a ASPX page . Here is the control code

<telerik:RadEditor ID="uxQuestion" Height="400px" Width="95%" runat="server" OnClientLoad="OnClientLoadofQuestion"
OnClientCommandExecuted="OnClientCommandExecuting" ToolsFile="~/BasicTools.xml" SaveInFile="true"  Skin="Outlook" EditModes="Design">   <Content> </Content>  </telerik:RadEditor>

I type the content in the Editor, and select any of the font name (say Verdana) or Real font size (22) and click on the underline button.
It underlines the content. When i save this content and try to edit it later, i cannot remove the underline.
Additionally, everything i type in this box is automatically underlined and I am not able to remove the underline.
Please see the image attached.

It works fine when i donot specify the Font name or Real font size at the first time. 

Please let me know what is the problem.

Rumen
Telerik team
 answered on 12 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?