Telerik Forums
UI for WinForms Forum
1 answer
238 views
I just started working with the controls. And now i'm trying to find a way to change the height of commandbar control in theme editor. I think I checked everything but did not find a way to it. ALthough, i can see the the height is different in office2010 and office2007 themes. Can someone point me to the right way to do that customization?
Appreciate your support.
Boryana
Telerik team
 answered on 03 May 2012
3 answers
230 views

Hello,

i want format numeric data in PropertyGrid - item.value and editor.value. 
For example:
value: 100000
formated value: 100 000

How can i do this? Can i use FormatString like "#,###"?

Greetings
Marek

Stefan
Telerik team
 answered on 03 May 2012
2 answers
629 views
Good Morning Telerik Community,

I am attempting to format certain cells in my RadGridView to remove the text from a cell if its value == 0.0 ... It works but for what ever reason it is Very slow and takes about two seconds to continue... Am I doing something wrong?

Note: The extension method String.ToDecimal() attempts to convert the string to a decimal and returns a decimal?, null if it failed. I've replaced it with a standard Convert.ToDecimal() and it made no difference..

        private Boolean CellFormatting { get; set; }
  
        private void gridGLDetails_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        {
  
            if (!CellFormatting && (e.Column.HeaderText == "Credit" || e.Column.HeaderText == "Debit") && e.CellElement.Text.ToDecimal() == 0.0M)
            {
                CellFormatting = true;
                e.CellElement.Text = "";
                CellFormatting = false;
            }
  
}
Stefan
Telerik team
 answered on 03 May 2012
2 answers
179 views
Hi,

I have a problem when formatting the background color of a row and then sorting the grid view. I have a gridview with 10 columns. Depending on a condition I color the background on some rows. See code. This works initially fine. But when I now sort the grid view more and more rows are colored. If I click a lot of times on different column headers all rows execept one have a formatted background. I'm surely forgot something to do, to make this work.

private void RadGridView1CellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (!String.IsNullOrEmpty(e.CellElement.RowInfo.Cells["Bearbeitungsfrist"].Value.ToString()))
            {
                var bfrist = (DateTime)e.Row.Cells["Bearbeitungsfrist"].Value;
 
                if (bfrist < DateTime.Now)
                {
                    e.CellElement.DrawFill = true;
                    e.CellElement.ForeColor = Color.White;
                    e.CellElement.NumberOfColors = 1;
                    e.CellElement.BackColor = Color.Coral;
                }
            }
        }

Thanks for your help,
Michael
xclirion
Top achievements
Rank 1
 answered on 03 May 2012
7 answers
213 views

Hello,
I have a data-bound point chart that I'd like to change the point size of some points on. Ideally I'd like to have the point size read from a data column like the bubble chart, but I can't figure out how to do that. I have some code that goes through the Chart Series and updates the point size, but the points shift off their center point.

(I found a similar problem documented here)  http://www.telerik.com/community/forums/aspnet-ajax/chart/how-to-set-a-size-changed-point-to-center-of-the-axes.aspx

My chart is plotting percentages for a variable number of people. I want to use the bubble size to show relative sample sizes in the percentages.

I've tried the Bubble chart, but it is difficult to get rid of ovals, especially when the chart resizes. There are a variable number of items in my chart, so it is not a grid. The bubble chart also has a problem when there is only one item in the chart. I've decided that a bubble chart cannot do what I want and a point chart is closer.

Is there a way to put the point back on its center coordinate? Or a way to use the bubble chart and get bubbles to be a pixel size (like the point chart) rather than use the coordinate system for plotting?

I'm using version 2011.3.11.1219 with the .NET 2.0 framework (Visual Studio 2010). My development machine is a Windows 7 - 64bit computer.

I've attached sample code that reproduces the problem. My real code loads data from a database and contains variable numbers of people.

Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Telerik.Charting;

namespace RadControlsWinFormsApp3
{
 public partial class Form1 : Form
 {
  public Form1()
  {
   InitializeComponent();

   DataTable dtPage = new DataTable();

   dtPage.TableName = "ChartData";
   dtPage.Columns.Add("Name", typeof(String));
   dtPage.Columns.Add("Completion", typeof(Double));
   dtPage.Columns.Add("PointRadius", typeof(Double));

   DataRow row = dtPage.NewRow();
   row[0] = "Person1";
   row[1] = .80d;
   row[2] = 20d;
   dtPage.Rows.Add(row);
   row = dtPage.NewRow();
   row[0] = "Person2";
   row[1] = .65d;
   row[2] = 40d;
   dtPage.Rows.Add(row);

   radChart1.DataSource = dtPage;
   radChart1.DataBind();

   //Force update of point sizes. We can't seem to do it from the bound data.
   foreach (ChartSeries series in radChart1.Series)
   {
    if (series.Type == Telerik.Charting.ChartSeriesType.Point)
    {
     series.Appearance.PointDimentions.AutoSize = false;
     foreach (ChartSeriesItem seriesItem in series.Items)
     {
      DataRow drow = dtPage.Rows[seriesItem.Index];
      double radius = (double)drow["PointRadius"];
      seriesItem.Appearance.PointDimentions.AutoSize = false;
      seriesItem.Appearance.PointDimentions.Height = Telerik.Charting.Styles.Unit.Pixel((float)(radius * 2));
      seriesItem.Appearance.PointDimentions.Width = Telerik.Charting.Styles.Unit.Pixel((float)(radius * 2));
      //(seriesItem.PointAppearance.Position).Auto = false;
      //(seriesItem.PointAppearance.Position).AlignedPosition = AlignedPositions.Center;
     }
    }
   }

  }
 }
}

 

Form1.Designer.cs
namespace RadControlsWinFormsApp3
{
 partial class Form1
 {
  /// <summary>
  /// Required designer variable.
  /// </summary>
  private System.ComponentModel.IContainer components = null;

  /// <summary>
  /// Clean up any resources being used.
  /// </summary>
  /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
  protected override void Dispose(bool disposing)
  {
   if (disposing && (components != null))
   {
    components.Dispose();
   }
   base.Dispose(disposing);
  }

  #region Windows Form Designer generated code

  /// <summary>
  /// Required method for Designer support - do not modify
  /// the contents of this method with the code editor.
  /// </summary>
  private void InitializeComponent()
  {
   Telerik.Charting.ChartAxisItem chartAxisItem1 = new Telerik.Charting.ChartAxisItem();
   Telerik.Charting.ChartAxisItem chartAxisItem2 = new Telerik.Charting.ChartAxisItem();
   Telerik.Charting.ChartAxisItem chartAxisItem3 = new Telerik.Charting.ChartAxisItem();
   Telerik.Charting.ChartAxisItem chartAxisItem4 = new Telerik.Charting.ChartAxisItem();
   Telerik.Charting.ChartAxisItem chartAxisItem5 = new Telerik.Charting.ChartAxisItem();
   Telerik.Charting.ChartAxisItem chartAxisItem6 = new Telerik.Charting.ChartAxisItem();
   Telerik.Charting.ChartAxisItem chartAxisItem7 = new Telerik.Charting.ChartAxisItem();
   Telerik.Charting.ChartSeries chartSeries1 = new Telerik.Charting.ChartSeries();
   this.radChart1 = new Telerik.WinControls.UI.RadChart();
   ((System.ComponentModel.ISupportInitialize)(this.radChart1)).BeginInit();
   this.SuspendLayout();
   //
   // radChart1
   //
   this.radChart1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
   this.radChart1.Location = new System.Drawing.Point(13, 13);
   this.radChart1.Name = "radChart1";
   this.radChart1.PlotArea.XAxis.AutoScale = false;
   this.radChart1.PlotArea.XAxis.AxisLabel.Appearance.RotationAngle = 270F;
   this.radChart1.PlotArea.XAxis.DataLabelsColumn = "Name";
   chartAxisItem1.Value = new decimal(new int[] {
            1,
            0,
            0,
            0});
   chartAxisItem2.Value = new decimal(new int[] {
            2,
            0,
            0,
            0});
   chartAxisItem3.Value = new decimal(new int[] {
            3,
            0,
            0,
            0});
   chartAxisItem4.Value = new decimal(new int[] {
            4,
            0,
            0,
            0});
   chartAxisItem5.Value = new decimal(new int[] {
            5,
            0,
            0,
            0});
   chartAxisItem6.Value = new decimal(new int[] {
            6,
            0,
            0,
            0});
   chartAxisItem7.Value = new decimal(new int[] {
            7,
            0,
            0,
            0});
   this.radChart1.PlotArea.XAxis.Items.AddRange(new Telerik.Charting.ChartAxisItem[] {
            chartAxisItem1,
            chartAxisItem2,
            chartAxisItem3,
            chartAxisItem4,
            chartAxisItem5,
            chartAxisItem6,
            chartAxisItem7});
   this.radChart1.PlotArea.XAxis.MinValue = 1D;
   this.radChart1.PlotArea.YAxis.Appearance.CustomFormat = "## %";
   this.radChart1.PlotArea.YAxis.AxisLabel.Appearance.RotationAngle = 0F;
   this.radChart1.PlotArea.YAxis.MaxValue = 80D;
   this.radChart1.PlotArea.YAxis.Step = 10D;
   this.radChart1.PlotArea.YAxis2.AxisLabel.Appearance.RotationAngle = 0F;
   chartSeries1.DataYColumn = "Completion";
   chartSeries1.DefaultLabelValue = "#Y{p1}";
   chartSeries1.Name = "Series 1";
   chartSeries1.Type = Telerik.Charting.ChartSeriesType.Point;
   this.radChart1.Series.AddRange(new Telerik.Charting.ChartSeries[] {
            chartSeries1});
   this.radChart1.SeriesOrientation = Telerik.Charting.ChartSeriesOrientation.Horizontal;
   this.radChart1.Size = new System.Drawing.Size(473, 317);
   this.radChart1.TabIndex = 0;
   //
   // Form1
   //
   this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
   this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
   this.ClientSize = new System.Drawing.Size(505, 362);
   this.Controls.Add(this.radChart1);
   this.Name = "Form1";
   this.Text = "Form1";
   ((System.ComponentModel.ISupportInitialize)(this.radChart1)).EndInit();
   this.ResumeLayout(false);

  }

  #endregion

  private Telerik.WinControls.UI.RadChart radChart1;
 }
}

 

Thanks

Peshito
Telerik team
 answered on 03 May 2012
10 answers
517 views
hi
I have a problem in multicolumnCombobox.
I set the dropdownStyle=DropDown .so when i do filtering, in some cases
when  the filtering result is only  one row ,this control   sugests and appends the this row,but i  dont want it to append the selected row ,i only want the suggestion .for example i want to write BubllBar ,when i start to writing and  Write 'Bub' ,multicolumnCombobox do filtering  and the filtering row is 'Bube' ,so it appends 'Bube' and then i must delete the 'e' and write 'BubllBar ' .please help me to solve this problem


 private void Form1_Load(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            radMultiColumnComboBox1.AutoFilter = true;
            radMultiColumnComboBox1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;
            dt.Columns.Add("Title", typeof(string));

            dt.Rows.Add("Tom");
            dt.Rows.Add("Bube");
            dt.Rows.Add("emy");
            dt.Rows.Add("Kate");
            
            radMultiColumnComboBox1.DataSource = dt;
            radMultiColumnComboBox1.EditorControl.FilterDescriptors.Add("Title", FilterOperator.Contains, string.Empty);
            
        }
Roya
Top achievements
Rank 1
 answered on 03 May 2012
13 answers
535 views
Dear

I am trying to use RadContextMenu with RadListControl and it have one problem with current version 12.1.321.0 . When I click one context menu item the Click event occur twice. The context menu was assigned to RadListControl using RadContextMenu property.

Please have to solve this problem.
Truong
Top achievements
Rank 1
 answered on 03 May 2012
3 answers
221 views
I'm currently evaluating the winforms suite of telerik controls for a future project and really like the excellent job you guys have done with it. When using the radScheduler I couldn't find a way to override the weekend days i.e. Saturday, Sunday to something that might be set programmatically based on a user's preferences so when the 'Show weekend' checkbox is checked/unchecked the user-defined weekend days would be shown/hidden. I would really appreciate any help with the matter.
Thanks.
Ali.
Ali
Top achievements
Rank 1
 answered on 02 May 2012
1 answer
172 views
Hi,
Does anyone know how to set the TextBox, TextBoxItem, EditControl or what ever property to read only so that the users can not type any text into it?  I've tried every sub control that has a read only property I could find.  Maybe I missed the correct one.

Thanks,

Mike

edit:

Still can not find it but accomplished with the KeyDown Event Handler
{
   e.SuppressKeyPress = true;
   e.Handled = true;
}
Stefan
Telerik team
 answered on 02 May 2012
1 answer
141 views
Hi

I have master and detail gridview, I must disable master gridview, when user try to modify detail.
Disable master gridview work fine, but user can't see which row is selected.
I want set selected row color even gridview is disable.

How can i do it?

Thanks in advanced 
Richard Slade
Top achievements
Rank 2
 answered on 02 May 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?