Telerik Forums
UI for WinForms Forum
2 answers
435 views

Hello,

In the chart legend, I would like to show a line next to an item instead of a square.  For the ChartView for Winforms I have been unable to find any information on the ability to change the shape.  Is that possible?

 

As I work around, I had an idea to set the top and bottom border as white and increase the border size thinking that I could make the square look like a line I tried that with the following code, but it seems to have no affect. The default black border is sown instead.

LegendItem item = new LegendItem();
item.Element.BackColor = Color.Blue;
item.Element.BorderBottomColor = Color.White;
item.Element.BorderTopColor = Color.White;
item.Element.BorderTopWidth = 3;
item.Element.BorderBottomWidth = 3;
this.mainChart.ChartElement.LegendElement.Items.Add(item);

 

I am able to change the entire border using the following code. It displays a smaller square, which is kind of acceptable but there seems to be a shadow still visible.

LegendItem item = new LegendItem();
item.Element.BackColor = Color.Blue;
item.Element.BorderColor = Color.White;
item.Element.BorderWidth = 3;
this.mainChart.ChartElement.LegendElement.Items.Add(item);

 

Any ideas on how to achieve my goal?

 

Chris

Chris Ward
Top achievements
Rank 1
 answered on 28 May 2019
4 answers
3.3K+ views

Hi,

I'm working with the RadGridView component directly without use a model binding.

I would like to add dynamically a new Row at a position in my grid view after an other row by using :

gridView.Rows.Insert(row.Index + 1, newRow);

It's working well if I'm not using a grouping. But when I add the grouping :

GroupDescriptor descriptor = new GroupDescriptor();
descriptor.GroupNames.Add("NomGroupe", ListSortDirection.Ascending);
gridView.GroupDescriptors.Add(descriptor);

It's not work because the Index is ordered by the groupe.

How How can I do?

Thanks for your help,

Simon

Dimitar
Telerik team
 answered on 28 May 2019
2 answers
246 views

Hi everybody, I'm evaluating RadBarcode for printing barcodes in thermal printers. My printers have a resolution of 203 dpi in both horizontal and vertical directions. I'm trying to generate an image of the barcode (EAN13) and sending to printer:

 

        public DrawBarcode(Point Location, Size Size, string valor): base(Location)
        {
            this.Valor = valor;
            bc = new RadBarcode();
            bc.Value = valor;
            
            var EAN13 = new Telerik.WinControls.UI.Barcode.Symbology.EAN13();
            EAN13.ShowText = true;

            bc.Symbology = EAN13;
            EAN13.Stretch = true;

            int n = 50;
            while (true)
            {
                try
                {
                    img = bc.ExportToImage(2*n, n);
                    this.size = img.Size;
                    return;
                }
                catch (Exception) { n += 10; }
            }
        }

 

        public override void Draw(Graphics g)
        {
            base.Draw(g);
            g.DrawImage(img, 0, 0);
        }

I have a base class for controling Drag, zoom and rotation but it is not important in this scenario. When I send the image to screen, text is rendered perfectly but when I send the image to the printer, text is not redeable. Is it any why to specify resolution in ExortToImage or any other why to change generated image resolution?

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 May 2019
1 answer
172 views

I'm trying to use the built-in Excel function COUNTIF on a cell range. How do you return the integer result of that value? Do I have to specifically set the formula to a cell first and get the result that way? Or can I somehow just get the result without actually having to write the formula to a cell? 

 

Thank you in advance.

Tanya
Telerik team
 answered on 27 May 2019
3 answers
297 views

Good day,

I want to get the zoom back to the original zoom and position after the radDiagram being zoomed.

Sometimes it is difficult to keep the zoom in good position. Thus I would like to put it again in the default zoom and point when pushing a button.

The RadDiagram making code, creating the RadDiagram:

    Telerik.Windows.Diagrams.Core.DiagramConstants.MinimumZoom = 0.1
    Telerik.Windows.Diagrams.Core.DiagramConstants.MaximumZoom = 10
    MyRadDiagram.Zoom = 0.1
    MyRadDiagram.IsSettingsPaneEnabled = False
    MyRadDiagram.DiagramElement.IsBackgroundSurfaceVisible = False
 
    MyRadDiagram.BackgroundGrid.Visibility = False
    MyRadDiagram.BackgroundPageGrid.Visibility = Telerik.WinControls.ElementVisibility.Hidden
    MyRadDiagram.BackgroundImageLayout = ImageLayout.None
    MyRadDiagram.BackgroundImage = Nothing
    posCentral = MyRadDiagram.Position

The code I use to get back to original zoom:

Private posCenter As New Telerik.Windows.Diagrams.Core.Point(0, 0)
Private Sub bCenterZoom_Click(sender As Object, e As EventArgs) Handles bCenterZoom.Click
    loading = True
    MyRadDiagram.Position = posCentral
    MyRadDiagram.Zoom = 0.1
    loading = False
End Sub

 

 

Iñaki
Top achievements
Rank 1
 answered on 27 May 2019
1 answer
196 views
Hello everybody,

Can you tell me if exists the ActionOnLostFocus property in Winforms like Wpf ?

In fact, when I editing a cell I validating it in the CellValidating event or RowValidating.
But if during the editing I click on other control form's, the cell is not commited and the CellValidating event not fire.

How can I manage this situation appropriately?

Thank you
Best regards
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 May 2019
1 answer
121 views

Greetings,

Is it possible to edit UI elements of  of controls  programmatically ?

For instance, I want to change header font of a Radgroupbox.

I normally should open its smartTag and change the font within root elements. But how to do it programmatically ?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 May 2019
3 answers
201 views
I have a chartview with three line series representing measurement values and two more displaying the upper an lower limit of the values.Is it possible to show the trackball only on the three measurement series. 
Dimitar
Telerik team
 answered on 27 May 2019
0 answers
119 views

Greetings,

Is it possible to disable System, Web or Professional tab in colorbox dialog ?

George C.
Top achievements
Rank 2
Iron
Veteran
 asked on 27 May 2019
0 answers
89 views

 Hello everyone,

 I have a problem, please help me solve it.

 How to realize the function of GridView, item (8, a) in GridView with RadGridView control.

hong
Top achievements
Rank 1
 asked on 27 May 2019
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?