Telerik Forums
UI for WinForms Forum
5 answers
2.2K+ views

Hello, 

actually I am testing the RadGridView.

I made a Grid with three columns. One of them as multiline textbox.

So, my problem is to set the row height dynamically with the number of the lines of the multiline cell.

The user should see all the lines of the multiline cell if the cell will be in edit mode.

I have read all the threads about that, but I don‘t find a solution.

Any help from you.

thank you and best regards

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Dec 2019
17 answers
115 views
Dear sir,
i want to show RadialGauge in Gridview in Telerik UI winform using in Desktop App but it's not working.
i need like this image
it is requested that help / guidance may be provided that how to radRadial gauge in Rad gridview  cell in Winform.

Thanks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Dec 2019
1 answer
147 views

Hi.

On a form, I am programmaticaly creating radButtons in tow different tabPages. The UI is rendered correctly in the first tab (see "Tab1.png") but not in the second ("Tab2.png"). They are generated the same way:

// For tab 1
RadButton b = new RadButton();
b.EnableTheming = true;
b.ThemeName = new DesertTheme().ThemeName;
b.Name = n;
b.Text = n;
b.Left = 10;
b.Top = (22 * i++);
b.MinimumSize = new Size(ptp1.Width - 40, 20);
b.MaximumSize = new Size(ptp1.Width - 40, 0);
b.AutoSize = true;
b.Padding = new Padding(4);
((TextPrimitive)b.ButtonElement.Children[1].Children[1]).TextWrap = true;
b.RootElement.StretchVertically = false;
b.TextAlignment = ContentAlignment.MiddleCenter;
b.Click += new EventHandler(onBtnRechercheClick);
tt.SetToolTip(b, b.Name);
ptp1.WindowsControl.Controls.Add(b);

 

// For tab 2

RadButton b2 = new RadButton();

b2.EnableTheming = true;
b2.ThemeName = new DesertTheme().ThemeName;
b2.Name = n2;
b2.Text = n2;
b2.Left = 10;
b2.Top = (22 * i2++);
b2.MinimumSize = new Size(ptp2.Width - 40, 20);
b2.MaximumSize = new Size(ptp2.Width - 40, 0);
b2.AutoSize = true;
b2.Padding = new Padding(4);
((TextPrimitive)b2.ButtonElement.Children[1].Children[1]).TextWrap = true;
b2.RootElement.StretchVertically = false;
b2.TextAlignment = ContentAlignment.MiddleCenter;
b2.Click += onBtnRechercheClick;
tt.SetToolTip(b2, b2.Name);
ptp2.WindowsControl.Controls.Add(b2);

Nadya | Tech Support Engineer
Telerik team
 answered on 11 Dec 2019
6 answers
863 views
Hello,

is there any way to set a single property Label font style to bold in the Grid? and is there also a way to set a different background color for the value input field?

I want show the user this property value is required. For this purpose I created a PropertyStoreItemExtended class inheriting the PropertyStoreItem with an added property Required. Now I have to find a way to customize Label and/or Value field in case of the Required property value.

Which PropertyGridEvent or (overridden) Methods can be used for that pupose?


Greetings from Leipzig

Holger Boskugel
--
http://vbwebprofi.de
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Dec 2019
3 answers
233 views

Greetings.

Using the code below, it is possible to set vertical group layout :

RadPanorama1.PanoramaElement.GroupLayout.Orientation = Orientation.Vertical

 

BUT,

what would be the usage as it disables the scroll ball. I found relevant threads, but It would be helpful for VB.NET developers if you just not provide solutions in C#, but also in VB.NET (I already know C# can be converted to VB.NET, but it isn't comfortable in many cases).

For instance, I edited the relevant thread to create custom Panoroma :

Imports Telerik.WinControls
Imports Telerik.WinControls.Layouts
Imports Telerik.WinControls.UI
 
Class CustomPanorama
    Inherits RadPanorama
 
    Private vScroll As RadScrollBarElement
 
    Protected Overrides Sub CreateChildItems(ByVal parent As Telerik.WinControls.RadElement)
        MyBase.CreateChildItems(parent)
        Me.vScroll = New RadScrollBarElement()
        Me.vScroll.ScrollType = ScrollType.Vertical
        Me.vScroll.StretchHorizontally = False
        Me.vScroll.StretchVertically = True
        Me.vScroll.MinSize = New System.Drawing.Size(16, 0)
        Me.vScroll.Alignment = System.Drawing.ContentAlignment.TopRight
        Me.PanoramaElement.Children.Add(vScroll)
        AddHandler vScroll.ValueChanged, AddressOf vScroll_ValueChanged
        AddHandler PanoramaElement.GroupLayout.RadPropertyChanged, AddressOf GroupLayout_RadPropertyChanged
        AddHandler PanoramaElement.TileLayout.RadPropertyChanged, AddressOf GroupLayout_RadPropertyChanged
        Me.ScrollBarAlignment = HorizontalScrollAlignment.Bottom
    End Sub
 
    Private Sub GroupLayout_RadPropertyChanged(ByVal sender As Object, ByVal e As Telerik.WinControls.RadPropertyChangedEventArgs)
        If e.Equals(RadElement.BoundsProperty) AndAlso sender = Me.GetCurrentLayout() Then
            UpdateVScroll()
        End If
    End Sub
 
    Protected Overrides Sub OnSizeChanged(ByVal e As EventArgs)
        MyBase.OnSizeChanged(e)
        UpdateVScroll()
    End Sub
 
    Private Sub UpdateVScroll()
        vScroll.Maximum = Me.GetCurrentLayout().Size.Height
        vScroll.LargeChange = Math.Max(0, CInt((Me.Size.Height - Me.PanoramaElement.ScrollBar.Size.Height)))
 
        If vScroll.LargeChange >= vScroll.Maximum Then
            vScroll.Visibility = ElementVisibility.Hidden
        Else
            vScroll.Visibility = ElementVisibility.Visible
        End If
 
        If Me.PanoramaElement.ScrollBar.Visibility = ElementVisibility.Visible Then
            vScroll.Margin = New System.Windows.Forms.Padding(0, 0, 0, Me.PanoramaElement.ScrollBar.Size.Height)
        Else
            vScroll.Margin = New System.Windows.Forms.Padding(0)
        End If
    End Sub
 
    Private Sub vScroll_ValueChanged(ByVal sender As Object, ByVal e As EventArgs)
        Me.GetCurrentLayout().PositionOffset = New System.Drawing.SizeF(0, -Me.vScroll.Value)
    End Sub
 
    Private Function GetCurrentLayout() As LayoutPanel
        If Me.ShowGroups Then
            Return Me.PanoramaElement.GroupLayout
        End If
 
        Return Me.PanoramaElement.TileLayout
    End Function
 
    Public Overrides Property ThemeClassName As String
        Get
            Return GetType(RadPanorama).FullName
        End Get
        Set(ByVal value As String)
            MyBase.ThemeClassName = value
        End Set
    End Property
End Class

 

But, in this way, we have to create all elements such as tiles programmatically, really difficult and annoying in comparison with visual creation.

 

How to enable vertical scrollbar for vertical Group Layout ?

 

Thanks in advance. 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Dec 2019
2 answers
1.8K+ views

Hi

Is there a way to disable the highlighting of the last selected button?

With:

        private void button_changebackcolor(object sender, System.EventArgs e)
        {
            if(((Telerik.WinControls.UI.RadButton)sender).BackColor != System.Drawing.Color.White)
            {
                ((Telerik.WinControls.UI.RadButton)sender).BackColor = System.Drawing.Color.White;
            }
        }

it's possible, but that makes problem with my real program, because sometimes I need to highlight a button with yellow and button_changebackcolor overrrides that.

 

Thank you in Advance

Kind Regards,

Dominik

Dominik
Top achievements
Rank 1
 answered on 09 Dec 2019
3 answers
163 views

Hi

How is it possible to change the backcolor of a ribbonTab if it's drop-downed.

I tried to change the following colors:

     

Dominik
Top achievements
Rank 1
 answered on 09 Dec 2019
2 answers
101 views

Hello,

Is there a simple way to open the DeleteRecurringAppointmentDialog? Just like adding an appointment with AddNewAppointmentWithDialog?

Best regards

Patrick Vossen

Patrick
Top achievements
Rank 1
 answered on 05 Dec 2019
7 answers
1.3K+ views

Hi- I'm having trouble with exporting grid contents to Excel- using winforms radgridview version 2018.1.220.40 in vb.net.  (Hopefully this is a stupid question but I've spent an hour looking through documentation and I think I'm missing something.)  I found the code snippet below in the documentation, but getting the error 

gridViewExport is not defined, and gridviewExportOptions not defined...  

I'm assuming that gridViewExport is supposed to be my radgridview object, but when I sub in the name of mine, it says 'export' is not a member of RadGridView... 

Can you advise?    Thanks very much. 

-----------------------------------------

https://docs.telerik.com/devtools/wpf/controls/radgridview/export/export

    Private Sub btnExport_Click(sender As Object, e As RoutedEventArgs)
        Dim extension As String = "xls"
        Dim dialog As New SaveFileDialog() With {
         .DefaultExt = extension,
         .Filter = String.Format("{1} files (.{0})|.{0}|All files (.)|.", extension, "Excel"),
         .FilterIndex = 1
        }
        If dialog.ShowDialog() = True Then
            Using stream As Stream = dialog.OpenFile()
                gridViewExport.Export(stream, New GridViewExportOptions() With {
                 .Format = ExportFormat.Html,
                 .ShowColumnHeaders = True,
                 .ShowColumnFooters = True,
                 .ShowGroupFooters = False
                })
            End Using
        End If
    End Sub

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Dec 2019
3 answers
118 views

Hello,

I have some issues with the MultiColumn ComboBox (in the following just CB) in Visual Studio, i'll show you some code steps:

 

step 1: init CB

With myCB
 
    .ClearTextOnValidation = True
    .DataBindings.Clear()
    .BestFitColumns()
    .ValueMember = "wpno"
    .DisplayMember = "wpno"
    .DataSource = myDataset.Tables("myTable")
    .AutoFilter = True
    .AutoCompleteMode = AutoCompleteMode.Append
 
    Dim compositeFilter As New CompositeFilterDescriptor()
    Dim selectField1 As New FilterDescriptor("fieldname1", FilterOperator.Contains, "")
    Dim selectField2 As New FilterDescriptor("fieldname2", FilterOperator.Contains, "")
    Dim selectField3 As New FilterDescriptor("fieldname3", FilterOperator.Contains, "")
    compositeFilter.FilterDescriptors.Add(selectField1)
    compositeFilter.FilterDescriptors.Add(selectField2)
    compositeFilter.FilterDescriptors.Add(selectField3)
    compositeFilter.LogicalOperator = FilterLogicalOperator.[Or]
 
    .EditorControl.FilterDescriptors.Clear()
    .EditorControl.FilterDescriptors.Add(compositeFilter)
 
    .ValueMember = "wpno"
    .DisplayMember = "wpno"
    .DataSource = myDataset.Tables("myTable")
 
End With

 

step 2: select an entry via the GUI or via

myCB.SelectedIndex = 2

works fine

 

step 3: open another form to edit some values of the selected entry

Me.Enabled = False
otherForm.Show()

 

step 4: Edit entry in other form, set a flag and return to first form (containing the CB)

updateEntry(updateField, updateValue)
updComboList = True
firstForm.Enabled = True
Me.Close()

 

step 5: reload values for the CB

If updComboList Then
    updateDataset()
    updateCB() 'code from step1
    CB.Enabled = True
    CB.SelectedIndex = 2 'doesn't work
End If

 

From now on, no change of selection via SelectedIndex or even via the GUI is possible! The CB is still responsive in terms of colors while hovering cells, but no selection is made when I click anywhere on the drop-down table of the CB. This table doesn't close again either.

 

Do you have any suggestions? Or is there maybe a bug with this MultiColumn ComboBox?

 

Thanks heaps.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Dec 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)
Chart (obsolete as of Q1 2013)
Form
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
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
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
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
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?