Telerik Forums
UI for WinForms Forum
1 answer
33 views

I need to quickly develop an 'updater' application that allows updating one or more software. I would like a look similar to the Adobe updater. What should I choose as a component? A grid? A ListView? Is it possible to have a column in the grid that changes its appearance: switches from a button to a progress bar?

 

Dinko | Tech Support Engineer
Telerik team
 answered on 01 Mar 2024
2 answers
34 views

When I Hide/Collapse the FILTER button in the column header, it doesn't remove the space from the header until the user clicks in the row/header.  I must be doing something wrong. Currently, I am using the ViewCellFormatting event to hide/collapse the FilterButton. 

 

Any ideas?

 

Thanks.

Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
 answered on 28 Feb 2024
1 answer
48 views

Hi, I'm trying to adapt my program to all type of screens with different scale settings and I encounted some difficulties with the RadColorPicker Dialog.

As you can see in the image below I tested my RadForm in a screen with the scale setted to 200% and when I open the RadColorPicker I cant see some controls that are inside of the Dialog.

I tried different setting and the only one where I can see all the controls is with the DPI aware setted to false but the texts are pixelated.

This is one of the test I made to set the DPI aware on my app.manifest:

 <asmv3:application>
   <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
     <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
   </asmv3:windowsSettings>
 </asmv3:application>

There's a way to set the DPI aware for the RadColorPicker dialog?

Thanks in advace.

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Feb 2024
1 answer
25 views

hello, i have use the approach from article https://docs.telerik.com/devtools/winforms/knowledge-base/display-and-edit-html-text-in-grid-cells to

show html in gridview ,but after set the datasource , the html style didn't display.  Just like the following image ,i have set the color to red use font element:

the second problem is that ,when the grid view render finished ,the first cell of the gridview is selected and the backgroud color is blue, when i set the second cell to selected , the first cell bgcolor not changed. the method clearSelection of the GridView cann't work,even though i called this method in constructor ,the first cell bgcolor is still blue.

thanks

Nadya | Tech Support Engineer
Telerik team
 answered on 31 Jan 2024
3 answers
28 views
   at Telerik.WinControls.UI.GridCommandCellElement.Detach() in Telerik.WinControls.UI\GridCommandCellElement.cs:line 41
   at Telerik.WinControls.UI.BestFitHelper.Detach(IVirtualizedElementProvider`1 cellElementProvider, GridCellElement cell) in Telerik.WinControls.UI\BestFitHelper.cs:line 388
   at Telerik.WinControls.UI.BestFitHelper.MeasureCell(GridViewRowInfo row, GridViewColumn column, BestFitColumnMode mode) in Telerik.WinControls.UI\BestFitHelper.cs:line 257
   at Telerik.WinControls.UI.BestFitHelper.CalculateColumnWidth(GridViewColumn column, BestFitColumnMode mode) in Telerik.WinControls.UI\BestFitHelper.cs:line 203
   at Telerik.WinControls.UI.BestFitHelper.BestFitColumnsCore(Nullable`1 mode) in Telerik.WinControls.UI\BestFitHelper.cs:line 139
   at Telerik.WinControls.UI.BestFitHelper.ProcessRequests() in Telerik.WinControls.UI\BestFitHelper.cs:line 76
   at Telerik.WinControls.UI.RowsContainerElement.MeasureOverride(SizeF availableSize) in Telerik.WinControls.UI\RowsContainerElement.cs:line 211
   at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
   at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
   at Telerik.WinControls.UI.ScrollViewElement`1.MeasureViewElement(SizeF availableSize)
   at Telerik.WinControls.UI.ScrollViewElement`1.MeasureView(SizeF availableSize)
   at Telerik.WinControls.UI.ScrollViewElement`1.MeasureOverride(SizeF availableSize)
   at Telerik.WinControls.UI.GridTableElement.MeasureOverride(SizeF availableSize) in Telerik.WinControls.UI\GridTableElement.cs:line 2396
   at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
   at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
   at Telerik.WinControls.Layouts.DockLayoutPanel.MeasureOverride(SizeF constraint)
   at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
   at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
   at Telerik.WinControls.UI.LightVisualElement.MeasureElements(SizeF availableSize, SizeF clientSize, Padding borderThickness)
   at Telerik.WinControls.UI.LightVisualElement.MeasureOverride(SizeF availableSize)
   at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
   at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
   at Telerik.WinControls.RootRadElement.MeasureOverride(SizeF availableSize)
   at Telerik.WinControls.RootRadElement.MeasureCore(SizeF availableSize)
   at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
   at Telerik.WinControls.RadElementTree.PerformInnerLayout(Boolean performMeasure, Int32 x, Int32 y, Int32 width, Int32 height)
   at Telerik.WinControls.RadControl.GetRootElementDesiredSize(Int32 x, Int32 y, Int32 width, Int32 height)
   at Telerik.WinControls.RadControl.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
   at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
   at System.Windows.Forms.Layout.DefaultLayout.ApplyCachedBounds(IArrangedElement container)
   at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
   at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
   at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
   at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
   at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
   at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
   at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(IArrangedElement affectedElement, String affectedProperty)
   at System.Windows.Forms.Control.OnResize(EventArgs e)
   at System.Windows.Forms.Panel.OnResize(EventArgs eventargs)
   at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.UI.RadPageViewPage.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Nadya | Tech Support Engineer
Telerik team
 answered on 31 Jan 2024
1 answer
26 views
Hi,

I want to have functionality that user can add row in a grid but cannot update the existing data in a grid how we can do.
hope you understand my requirement.

i.e. Row Insert Allowed but update not allowed.

Thanks,
Shubham Jain
Nadya | Tech Support Engineer
Telerik team
 answered on 30 Jan 2024
1 answer
30 views
I am using a gridview, I have a column created without linking to combo type data, in the createcell event I fill the combo list but when selecting an element it is not shown in the column, however its value is taken. Could someone help me now? break your head
Nadya | Tech Support Engineer
Telerik team
 answered on 23 Jan 2024
2 answers
273 views
Would it be possible to create combobox (within GridViewComboBoxColumn) with image and text (as it was done for RadDropDownList)?
Nadya | Tech Support Engineer
Telerik team
 answered on 16 Jan 2024
1 answer
38 views

Hello,

I created a custom column and cell in my grid following the progress-bar example

https://docs.telerik.com/devtools/winforms/controls/gridview/cells/creating-custom-cells

But I have modified it so that I can view either a textBoxElement or a dropDownListElement depending on what data is in the cell. It all seems to work just fine until I scroll the grid. Scrolling visualy shuffles the data in the custom column. I've tried to take the cell-formatting route but without success. Is it possible to achieve this result somehow?

 Public Class GridParameterValueElement
        Inherits GridDataCellElement

        Public Sub New(ByVal column As GridViewColumn, ByVal row As GridRowElement)
            MyBase.New(column, row)
        End Sub

        Private isInitialized As Boolean
        Private firstTimeIndexChanged As Boolean = True
        Private dropDown As RadDropDownListElement
        Private textBox As RadTextBoxElement
        Protected Overrides Sub CreateChildElements()
            MyBase.CreateChildElements()
            dropDown = New RadDropDownListElement() With { 
                .DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList
            }
            textBox = New RadTextBoxElement() With {
                .Enabled = True,
                .ClickMode = Telerik.WinControls.ClickMode.Press,
                .ZIndex = -1
            }
            If Me.Children.Contains(dropDown) Then Me.Children.Remove(dropDown)
            If Me.Children.Contains(textBox) Then Me.Children.Remove(textBox)
            Me.Children.Add(dropDown)
            Me.Children.Add(textBox)
            AddHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged
            AddHandler textBox.TextChanged, AddressOf TextInBoxChanged
            'AddHandler textBox.Click, AddressOf TextBox_Click

        End Sub

        Protected Overrides Sub DisposeManagedResources()
            RemoveHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged
            RemoveHandler textBox.TextChanged, AddressOf TextInBoxChanged
            MyBase.DisposeManagedResources()
        End Sub
            
        'Private Sub TextBox_Click(sender As Object, e As EventArgs)
        '    Dim test  = sender
        'End Sub


        Public Overrides Sub SetContent()
            MyBase.SetContent()

            If Me.RowInfo.Cells("DisplayValue").Tag IsNot Nothing Then

                If Not Me.isInitialized Then 
                    If Me.Children.Contains(textBox) Then Me.Children.Remove(textBox)

                    With Me.dropDown
                        .DataSource = Me.RowInfo.Cells("DisplayValue").Tag
                        .ValueMember = ("DevelopmentTypeParameterValueId")
                        .DisplayMember = ("ParameterValue")
                    End With 
                End If

                If Me.RowInfo.Tag IsNot Nothing Then
                    RemoveHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged
                    dropDown.SelectedIndex = DirectCast(Me.RowInfo.Tag, Integer)
                    AddHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged
                Else
                    RemoveHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged
                    dropDown.SelectedIndex = -1
                    AddHandler dropDown.SelectedIndexChanged, AddressOf SelectedIndexChanged
                End If

            ElseIf Me.Value IsNot Nothing AndAlso Me.Value IsNot DBNull.Value Then

                If Not Me.isInitialized Then 
                    If Me.Children.Contains(dropDown) Then Me.Children.Remove(dropDown)
                    Me.textBox.Text = CStr(Me.Value)
                End If
       
            End If

            Me.isInitialized = True
        
        End Sub


        Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
            Get
                Return GetType(GridDataCellElement)
            End Get
        End Property

        Public Overrides Function IsCompatible(ByVal data As GridViewColumn, ByVal context As Object) As Boolean
            Return TypeOf data Is GridViewParameterValueColumn AndAlso TypeOf context Is GridDataRowElement
        End Function

    End Class
    
    Public Class GridViewParameterValueColumn
        Inherits GridViewDataColumn
        Public Sub New(ByVal fieldName As String)
            MyBase.New(fieldName)
        End Sub
        Public Overrides Function GetCellType(ByVal row As GridViewRowInfo) As Type
            If TypeOf row Is GridViewDataRowInfo Then
                Return GetType(GridParameterValueElement)
            End If
            Return MyBase.GetCellType(row)
        End Function
    End Class


Nadya | Tech Support Engineer
Telerik team
 answered on 16 Jan 2024
2 answers
28 views

Hi,

I would like to have a grid with no cell selected by default. So every time it is loaded no CurrentCell is selected. Same when there is no selection and the grid is sorted by a column.

Right now, the grid marks the first cell as CurrentCell when it is loaded. I could solve it using the .ClearSelection() method but then I have the same problem when sorting: the first cell is marked as selected.

How can avoid this behavior and only set the CurrentCell when the user marks it?

Nadya | Tech Support Engineer
Telerik team
 answered on 15 Jan 2024
Narrow your results
Selected tags
Tags
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
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
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
ContextMenu
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
DateTimePicker
CollapsiblePanel
Conversational UI, Chat
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
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
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?