Hallo Admin,
here I have a problem when I want to give a line to the label series on the ChartView (DonutSeries),
in this case I want to label the line always up, even though the position of the chart data is below
which I have created is in the image (Chart_No.png)
and I want to make like the image (Chart_Yes.png)
this is the method that i have created.
private void DrawRadChartViewDonutChart(RadChartView p_oRadChart)
{
p_oRadChart.View.Margin = new Padding(20); //set pie padding
p_oRadChart.AreaType = ChartAreaType.Pie; //set to pie chart type
p_oRadChart.Series.Clear();
#region Config New Chart Series
Telerik.WinControls.UI.DonutSeries smartPie = new Telerik.WinControls.UI.DonutSeries();
smartPie.Name = "Series";
smartPie.InnerRadiusFactor = 0.45f; //setting inner radious doughnut so it can change as Doughnut Chart
smartPie.LabelMode = PieLabelModes.Horizontal;
smartPie.ShowLabels = true; //show label text
smartPie.DrawLinesToLabels = true; //show label line connector
smartPie.LinesToLabelsColor = Color.FromArgb(197, 156, 97); //set label line connector color
smartPie.SyncLinesToLabelsColor = false; //set true if we want to set label line color the same as series color
smartPie.Size = new Size(200, 200);
//set angle range starting position
AngleRange range = smartPie.Range;
range.StartAngle = 250;
smartPie.Range = range;
#endregion
#region Generate Data
List<DataChart> lData = new List<DataChart>();
lData.Add(new DataChart("Savings", 30));
lData.Add(new DataChart("Deposit", 15));
lData.Add(new DataChart("Credit", 15));
lData.Add(new DataChart("BancaAssurance", 10));
lData.Add(new DataChart("MutualFund", 10));
lData.Add(new DataChart("Jasa Giro", 20));
#endregion
//add slice area
foreach (DataChart d in lData)
{
PieDataPoint point = new PieDataPoint(Convert.ToDouble(d.Value), d.Name);
point.Label = d.Name.ToUpper();
point.Label = string.Format("{0} | {1}%{2}{3} {4}", d.Name.ToUpper(), d.Value, Environment.NewLine, "IDR", Convert.ToDouble(d.ValueRp).ToString("N0"));
smartPie.DataPoints.Add(point);
}
p_oRadChart.Series.Add(smartPie);
#region Setting Series Slice Color
p_oRadChart.Series[0].Children[0].BackColor = Color.FromArgb(193, 152, 105);
p_oRadChart.Series[0].Children[1].BackColor = Color.FromArgb(207, 175, 140);
p_oRadChart.Series[0].Children[2].BackColor = Color.FromArgb(221, 198, 173);
p_oRadChart.Series[0].Children[3].BackColor = Color.FromArgb(235, 221, 206);
p_oRadChart.Series[0].Children[4].BackColor = Color.FromArgb(193, 152, 105);
p_oRadChart.Series[0].Children[5].BackColor = Color.FromArgb(207, 175, 140);
p_oRadChart.Series[0].IsVisible = true;
#endregion
}
please help, thank you
Please provide a basic example (or a link to) of how to use the DesktopAlertManager.
I want to be able to display multiple alerts and stack them if they appear at the same time.
We are in the early process of converting from VB to C#. Before we convert, we are turning on Option Strict, one project at a time. I got the following Late Binding error on a RadDropDownList.DataSource. DataSource is deemed as an object (line 09 & 14), which is what is throwing the error, but not sure how to repair this. (error screenshot attached)
01.
Public
Shared
Function
IndexOfKeyOrValue(
ByRef
ddl
As
RadDropDownList,
ByVal
myString
As
String
,
ByVal
LocateKey
As
Boolean
)
As
Integer
02.
' What I would like to do is pass any control to this function, see if it has a datasource and then do the rest.
03.
' Use the TypeOf to determine the type of the control
04.
'AddEvent("IndexOfKeyOrValue Looking For: " & myString & " in " & ddl.Name)
05.
Try
06.
For
xx
As
Integer
= 0
To
ddl.Items.Count
07.
'AddEvent(ddl.DataSource(xx).Key & " " & ddl.DataSource(xx).Value)
08.
If
LocateKey
Then
09.
If
ddl.DataSource(xx).Key = myString
Then
10.
'AddEvent("---- Index Found = " & xx)
11.
Return
xx
12.
End
If
13.
Else
14.
If
ddl.DataSource(xx).Value = myString
Then
15.
'AddEvent("---- Index Found = " & xx)
16.
Return
xx
17.
End
If
18.
End
If
19.
20.
Next
21.
Catch
ex
As
Exception
22.
' AddEvent("---- NOT FOUND Index = -1")
23.
Return
-1
24.
End
Try
25.
End
Function
'IndexOfKeyOrValue
Hello team,
i got a RadRibbonBar, with RibbonBarGroups in it and one of the RadRibbonBarGroups contains a RadTextBoxElement. Im currently failing at the following goal:
- i want to catch the moment when the textbox looses the mouse focus.
Im using the MouseDown event to initiate the user interaction with the textbox and now i want an oposite to that, so that i can recognize if the user has "mousedowned" any other control on the screen.
I tried the MouseLeave event which seems not to be the totaly right thing, but still better than nothing - this even fires from time to time but i cant tell on which exact condition. Moving the mouse away from the textbox does not always trigger it.
The MouseLostCapture event - not sure if its right at all - didnt trigger even once.
Please tell what event should i use for my need?
Thank you!
Is it possible to properly display HTML that was exported from a RadRichTextBox in a GridView cell?
The user is allowed to use many of RadRichTextBox's formatting features when entering data into a RadRichTextBox. This data is saved to the database using the HtmlFormatProvider. I am currently saving the HTML as an HTML fragment with inline formatting. The HTML is later pulled from the database and used to populate the RadRichTextBox. I am able to retain the HTML formatting with no problem.
However, the HTML is not formatted properly when displayed in a GridView. It is simply displayed as text, including all HTML tags. Setting DisableHTMLRendering to false for the appropriate columns does not work.
I noticed that simple HTML displays correctly. For example, the following mark-up displays "text" in blue letters as expected:
"<html><color=0,0,255>text"
The following is a simple example of HTML exported from the RadRichTextBox using the HtmlFormatProvider:
<p style="margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px;"><span style="font-family: 'Times New Roman';font-style: normal;font-size: 16px;color: #0000FF;">Text</span></p>
Hi,
I'm really loving the SyntaxEditor component but i'm looking for a way to print specific parts of my SQL bold.
Take for instance the query: SELECT * FROM Customers WHERE CustomerId=%CustomerId%
I want the %CustomerId% part printed bold. Is this possible?
Thanks,
Ben
I am using the following code and cannot get the WaitingBar to start animation. I was running a Task, but tried adding a DoEvents and a Sleep to see if I could get it going. Not sure why. I am using the same WaitingBar in other places in my app and it works fine, but not here.
radWaitingBar1.Visible = true;
radWaitingBar1.Text = "Downloading files";
// radWaitingBar1.ResetWaiting();
radWaitingBar1.StartWaiting();
Application.DoEvents();
Thread.Sleep(5000);
//task = Task.Run(() => Run("um.zip"));
//task.Wait();
radWaitingBar1.StopWaiting();
radWaitingBar1.Visible = false;