Telerik Forums
UI for WinForms Forum
4 answers
209 views

Hello

in the FontDialog of the RadBrowseEditor is it possible to hide the three elements:
- Effects
- Sample
- Script

Thanks in advance

Pierre-Jean

pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 28 Nov 2019
5 answers
554 views

I need the right-click context, so setting the scheduler to readonly isn't an option.

I need to stop the scheduler showing the edit dialog when an appointment is double clicked... Any ideas?

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

Hello,

I have a dock, with 3 tool windows inside. There is only space for 2 out of 3 when the form is not maximized, how can I enable scrollbars / scrolling for the dock when there is not enough space for all of them?

 

Thanks in advance

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Nov 2019
2 answers
130 views

I think I have discovered a bug in the ChartView below is the designer and code for the user control

If you create a user control and past the code into it you should be able to replicate this;

Note: to load the chart - double-click on the chart

The first time it loads properly

The second time you double-click it - you will see that it loses its formatting.

Maybe (it's possible) that I have some conflicting line(s) of code causing this but I cannot find any conflicting code... perhaps you can test out and let me know what you think?

 

Here's the UserControl.vb Code

Imports Telerik.Charting
Imports Telerik.WinControls
Imports Telerik.WinControls.UI
Imports TelerikHelper

Public Class ucChartTest
    Private Sub ucChartTest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        populateCustomers()
        populateQ1()
        populateQ2()
        populateQ3()
        populateQ4()
    End Sub

#Region " ENUMS "
    Private Enum GridFields
        CustomerRefFullName = 0
        Q1 = 1
        Q2 = 2
        Q3 = 3
        Q4 = 4
        Total = 5
    End Enum
#End Region

#Region " ArrayLists "
    Private _arrCustomers As New ArrayList
    Private Sub populateCustomers()
        _arrCustomers.Clear()
        _arrCustomers.Add("Customer 1")
        _arrCustomers.Add("Customer 2")
        _arrCustomers.Add("Customer 3")
        _arrCustomers.Add("Customer 4")
        _arrCustomers.Add("Customer 5")
        _arrCustomers.Add("Customer 6")
        _arrCustomers.Add("Customer 7")
        _arrCustomers.Add("Customer 8")
        _arrCustomers.Add("Customer 9")
        _arrCustomers.Add("Customer 10")
    End Sub

    Private _arrQ1 As New ArrayList
    Private Sub populateQ1()
        _arrQ1.Clear()
        _arrQ1.Add(73)
        _arrQ1.Add(69)
        _arrQ1.Add(50)
        _arrQ1.Add(32)
        _arrQ1.Add(34)
        _arrQ1.Add(19)
        _arrQ1.Add(27)
        _arrQ1.Add(24)
        _arrQ1.Add(27)
        _arrQ1.Add(30)
    End Sub

    Private _arrQ2 As New ArrayList
    Private Sub populateQ2()
        _arrQ2.Clear()
        _arrQ2.Add(40)
        _arrQ2.Add(82)
        _arrQ2.Add(47)
        _arrQ2.Add(46)
        _arrQ2.Add(32)
        _arrQ2.Add(21)
        _arrQ2.Add(39)
        _arrQ2.Add(45)
        _arrQ2.Add(29)
        _arrQ2.Add(33)
    End Sub

    Private _arrQ3 As New ArrayList
    Private Sub populateQ3()
        _arrQ3.Clear()
        _arrQ3.Add(93)
        _arrQ3.Add(76)
        _arrQ3.Add(58)
        _arrQ3.Add(41)
        _arrQ3.Add(41)
        _arrQ3.Add(37)
        _arrQ3.Add(35)
        _arrQ3.Add(22)
        _arrQ3.Add(39)
        _arrQ3.Add(21)
    End Sub

    Private _arrQ4 As New ArrayList
    Private Sub populateQ4()
        _arrQ4.Clear()
        _arrQ4.Add(75)
        _arrQ4.Add(39)
        _arrQ4.Add(31)
        _arrQ4.Add(27)
        _arrQ4.Add(30)
        _arrQ4.Add(51)
        _arrQ4.Add(10)
        _arrQ4.Add(13)
        _arrQ4.Add(6)
        _arrQ4.Add(16)
    End Sub
#End Region

#Region " Quarterly Sales Distribution "
    Private Sub BuildQuarterlySalesDistribution()
        Try
            RadChartView2.Series.Clear()

            RadChartView2.ShowLegend = True
            RadChartView2.ShowTitle = False
            RadChartView2.ShowSmartLabels = True
            RadChartView2.ShowGrid = True

            RadChartView2.Area.View.Palette = KnownPalette.Warm

            RadChartView2.ChartElement.LegendElement.TitlePosition = TitlePosition.Top
            RadChartView2.ChartElement.LegendPosition = LegendPosition.Top
            RadChartView2.ChartElement.LegendElement.StackElement.Orientation = Orientation.Horizontal

            AddHandler RadChartView2.ChartElement.LegendElement.VisualItemCreating, AddressOf LegendElement_VisualItemCreating

            Dim barSeriesQ1 As New Telerik.WinControls.UI.BarSeries("Q1", "Customer")
            For i As Integer = 0 To _arrQ1.Count - 1
                barSeriesQ1.DataPoints.Add(New CategoricalDataPoint(CDbl(_arrQ1(i)), _arrCustomers(i)))
            Next
            barSeriesQ1.ShowLabels = False
            barSeriesQ1.LegendTitle = "Q1"
            barSeriesQ1.CombineMode = ChartSeriesCombineMode.Stack
            RadChartView2.Series.Add(barSeriesQ1)

            Dim barSeriesQ2 As New Telerik.WinControls.UI.BarSeries("Q2", "Customer")
            For i As Integer = 0 To _arrQ2.Count - 1
                barSeriesQ2.DataPoints.Add(New CategoricalDataPoint(CDbl(_arrQ2(i)), _arrCustomers(i)))
            Next
            barSeriesQ2.ShowLabels = False
            barSeriesQ2.LegendTitle = "Q2"
            barSeriesQ2.CombineMode = ChartSeriesCombineMode.Stack
            RadChartView2.Series.Add(barSeriesQ2)

            Dim barSeriesQ3 As New Telerik.WinControls.UI.BarSeries("Q3", "Customer")
            For i As Integer = 0 To _arrQ3.Count - 1
                barSeriesQ3.DataPoints.Add(New CategoricalDataPoint(CDbl(_arrQ3(i)), _arrCustomers(i)))
            Next
            barSeriesQ3.ShowLabels = False
            barSeriesQ3.LegendTitle = "Q3"
            barSeriesQ3.CombineMode = ChartSeriesCombineMode.Stack
            RadChartView2.Series.Add(barSeriesQ3)

            Dim barSeriesQ4 As New Telerik.WinControls.UI.BarSeries("Q4", "Customer")
            For i As Integer = 0 To _arrQ4.Count - 1
                barSeriesQ4.DataPoints.Add(New CategoricalDataPoint(CDbl(_arrQ4(i)), _arrCustomers(i)))
            Next
            barSeriesQ4.ShowLabels = False
            barSeriesQ4.LegendTitle = "Q4"
            barSeriesQ4.CombineMode = ChartSeriesCombineMode.Stack
            RadChartView2.Series.Add(barSeriesQ4)


            RadChartView2.GetArea(Of CartesianArea)().Orientation = Orientation.Horizontal
            Application.DoEvents()
        Catch ex As Exception

        End Try
    End Sub

    Private Sub LegendElement_VisualItemCreating(sender As Object, e As LegendItemElementCreatingEventArgs)
        e.ItemElement = New CustomLegendItemElement(e.LegendItem)
    End Sub

    Private Sub RadChartView2_LegendElement_VisualItemCreating(sender As Object, e As LegendItemElementCreatingEventArgs)
        e.ItemElement = New CustomLegendItemElement(e.LegendItem)
    End Sub

    Private Sub RadChartView2_DoubleClick(sender As Object, e As EventArgs) Handles RadChartView2.DoubleClick
        BuildQuarterlySalesDistribution()
    End Sub

    Private Sub RadChartView2_LabelFormatting(sender As Object, e As ChartViewLabelFormattingEventArgs) Handles RadChartView2.LabelFormatting
        Try
            e.LabelElement.Font = FontSegio
            e.LabelElement.BorderColor = Color.Black
            e.LabelElement.BackColor = Color.White
            e.Series.LabelRotationAngle = 45
            Dim series As BarSeries = TryCast(e.Series, BarSeries)
            Dim dblBarChartDataPoint As Double = GetBarChartDataPointValue(RadChartView2, e)
        Catch ex As Exception

        End Try
    End Sub
#End Region

End Class


 

Here's the Designer Code

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class ucChartTest
    Inherits System.Windows.Forms.UserControl

    'UserControl overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()>
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()>
    Private Sub InitializeComponent()
        Dim CartesianArea1 As Telerik.WinControls.UI.CartesianArea = New Telerik.WinControls.UI.CartesianArea()
        Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
        Me.RadLabel4 = New Telerik.WinControls.UI.RadLabel()
        Me.RadChartView2 = New Telerik.WinControls.UI.RadChartView()
        Me.TableLayoutPanel1.SuspendLayout()
        CType(Me.RadLabel4, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadChartView2, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'TableLayoutPanel1
        '
        Me.TableLayoutPanel1.BackColor = System.Drawing.Color.White
        Me.TableLayoutPanel1.ColumnCount = 1
        Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
        Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
        Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
        Me.TableLayoutPanel1.Controls.Add(Me.RadLabel4, 0, 1)
        Me.TableLayoutPanel1.Controls.Add(Me.RadChartView2, 0, 2)
        Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.TableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
        Me.TableLayoutPanel1.Margin = New System.Windows.Forms.Padding(0)
        Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
        Me.TableLayoutPanel1.RowCount = 3
        Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
        Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28.0!))
        Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
        Me.TableLayoutPanel1.Size = New System.Drawing.Size(370, 374)
        Me.TableLayoutPanel1.TabIndex = 0
        '
        'RadLabel4
        '
        Me.RadLabel4.AutoSize = False
        Me.RadLabel4.Dock = System.Windows.Forms.DockStyle.Fill
        Me.RadLabel4.Font = New System.Drawing.Font("Segoe UI Semilight", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.RadLabel4.Location = New System.Drawing.Point(0, 28)
        Me.RadLabel4.Margin = New System.Windows.Forms.Padding(0)
        Me.RadLabel4.Name = "RadLabel4"
        Me.RadLabel4.Size = New System.Drawing.Size(370, 28)
        Me.RadLabel4.TabIndex = 3
        Me.RadLabel4.Text = "QUARTERLY SALES DISTRIBUTION"
        '
        'RadChartView2
        '
        Me.RadChartView2.AreaDesign = CartesianArea1
        Me.RadChartView2.Dock = System.Windows.Forms.DockStyle.Fill
        Me.RadChartView2.Location = New System.Drawing.Point(3, 59)
        Me.RadChartView2.Name = "RadChartView2"
        Me.RadChartView2.ShowGrid = False
        Me.RadChartView2.Size = New System.Drawing.Size(364, 312)
        Me.RadChartView2.TabIndex = 8
        '
        'ucChartTest
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.Controls.Add(Me.TableLayoutPanel1)
        Me.Margin = New System.Windows.Forms.Padding(0)
        Me.Name = "ucChartTest"
        Me.Size = New System.Drawing.Size(370, 374)
        Me.TableLayoutPanel1.ResumeLayout(False)
        CType(Me.RadLabel4, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadChartView2, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

    Friend WithEvents TableLayoutPanel1 As TableLayoutPanel
    Friend WithEvents RadLabel4 As Telerik.WinControls.UI.RadLabel
    Friend WithEvents RadChartView2 As Telerik.WinControls.UI.RadChartView
End Class














Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Nov 2019
16 answers
764 views
Hi all,

I am pretty sure it is very easy to achive but I just can't find it.

I have an application that uses quite a lot of CollapsiblePanels but it also uses Tabs and so the layout has a lot of borders that make the whole stuff look a bit... restless.
So I want to hide the border of the CollapsiblePanels without having to mess with the theme (the tool uses a theme manager and the user can switch between some of the custom themes) so I need to hide the borders in general.

How can I do that?

Kind regards,
Gabriele
Martin
Top achievements
Rank 1
 answered on 27 Nov 2019
2 answers
315 views

hello Telerik!

can i change hamburger menu (☰) to my own icon/png and show another icon when menu expand?

another question: like css, set animation to change icon/png/svg for collapse/expand ?

Nadya | Tech Support Engineer
Telerik team
 answered on 26 Nov 2019
9 answers
485 views
I want to hide and show the radpageview backstage menu when i press the button and it will get collapse and free up the space on screen and then same button press again it will show up the menu .. Second thing i wants two buttons when i press first one the menu will move down and when press second button the menu will move up and in last i want a back button on each page of radpageview which take to previous page.. I attach the sample of behavior from rad demo application. I need implementation as done in demo app. Thanks. 
Nadya | Tech Support Engineer
Telerik team
 answered on 26 Nov 2019
5 answers
272 views
I am using conditional formatting on multiple columns, setting the background color based on the value in the cell.

Conditions are if value of cell is Between 0.23 and 3.41, set background color to Yellow.

This works well until in one column the cell value >= 10.0 and it starts to highlight the cell again.
Dimitar
Telerik team
 answered on 26 Nov 2019
2 answers
170 views
grid export function

WINFORMS
    gridview ver: 2019.3.917.40

What happens is the excel doc ends up with only the one sheet, the 2nd one.
Why?
What am I doing wrong?

I send in;
     a grid Telerik.WinControls.UI.RadGridView objGrid
     SheetName
     NbrOfGrids
    
Calling code!
     strDocToOpen = exportGrid(radGrid1, "sheetname1", 2);
     strDocToOpen = exportGrid(radGrid2, "sheetname2", 2);
    
     Call to Open strDocToOpen
    

EXPORT Function code!

// export the grid to an excel file
Telerik.WinControls.Export.GridViewSpreadExport exporter = new Telerik.WinControls.Export.GridViewSpreadExport(objGrid)
{
    ExportFormat = Telerik.WinControls.Export.SpreadExportFormat.Xlsx
};
Telerik.WinControls.Export.SpreadExportRenderer exporterRenderer = new Telerik.WinControls.Export.SpreadExportRenderer();

exporter.SheetName = strSheetName;   

// if more then one grid to be in exceldoc
if (intNbrOfGrids > 1)
{
    exporter.FileExportMode = Telerik.WinControls.Export.FileExportMode.NewSheetInExistingFile;
};

string strPathToMyDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
strFileName = "MyDoc";

exporter.RunExport(strPathToMyDocuments + @"\" + strFileName + ".xlsx", exporterRenderer);
 
Returns  (strPathToMyDocuments + @"\" + strFileName + ".xlsx")
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
 answered on 25 Nov 2019
2 answers
257 views

I have been trying to turn a stacked barchart to be horizontal - and must be misunderstand what must be a simple solution to my problem.

using the Telerik Example for a stacked barChart - how do I set this so that the Representatives are on the vertical axis and the performance values are on the bottom horizontal axis as shown in the attached image.

Thank you in advance

            Dim barSeries As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
            barSeries.Name = "Q1"
            barSeries.DataPoints.Add(New CategoricalDataPoint(177, "Harley"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(128, "White"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(143, "Smith"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(111, "Jones"))
            barSeries.DataPoints.Add(New CategoricalDataPoint(118, "Marshall"))

            Dim barSeries2 As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
            barSeries2.Name = "Q2"
            barSeries2.DataPoints.Add(New CategoricalDataPoint(153, "Harley"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(141, "White"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(130, "Smith"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(88, "Jones"))
            barSeries2.DataPoints.Add(New CategoricalDataPoint(109, "Marshall"))
            RadChartView2.Series.Add(barSeries2)
            barSeriesQ1.CombineMode = ChartSeriesCombineMode.Stack
            barSeries2.CombineMode = ChartSeriesCombineMode.Stack

 

Martin Hamilton
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 25 Nov 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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
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?