Telerik Forums
UI for WinForms Forum
1 answer
128 views

Recently I needed to dive into the UI Elements at Design Time to make some adjustments...this project is several years old and it's been a while since I've been into this dialog box so the issue may be months old and I simply didn't notice. 

 

Anyway here's the issue: when I click the tiny right-arrow at the top right corner of the grid in Design Mode I see the usual helper-popup window.

I select the 4th item down per-usual "Edit UI Elements" and get the Element hierarchy editor.

Under Control element structure I am pretty sure there used to be a fair number of branches listed under the main branch but now I only see the main branch with no way of expanding to see what lives under it (see attached picture below.)

 

Am I wrong?  Does the RadGridView NOT have any editable elements?  I'm certain once upon a time I came in here to edit the Column Header Height and a few of the colors.

 

I have reinstalled Telerik R3 2018 (The version this application uses)

I have re-copied the DLLs from the installation folder to the application's "Libraries" folder to make sure I had not accidentally overwritten one or more.

I have created a 100% new WinForm and placed a grid on it to check - same results.

I created a 100% new Telerik Project and again placed a grid on the main form - same results.

 

Any advice/suggestions you can offer would be greatly appreciated.

-Curtis

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Jan 2020
1 answer
219 views

How do we make multiple selections?

I cannot make multiple selections in Multi Column.

I wonder what I have to watch out for.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Jan 2020
3 answers
229 views
Hi,

I've got a radPageView in Backstage view mode, how to set the height of an item in the tab list ?

I've been able to achieve this with this code snippet 

foreach (RadPageViewPage page in this.radPageView.Pages)
{
     page.Item.MaxSize = new Size(0, 20);
}

But I want to do this in design mode, not programatically.

Thanks
Nadya | Tech Support Engineer
Telerik team
 answered on 10 Jan 2020
5 answers
324 views

Hello, how can I choose a text message and copy it. The attribute CanFocus = True but I cannot select the text message.

Please let me know how to solve my problem. Tks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Jan 2020
1 answer
365 views

Hello and a happy new Year!!!

I implement a drag&drop-function from RadPanels inside a System.Windows.Forms.FlowLayoutPanel.

When i come to the DragDrop-Event the "DragEventArgs e" only have the Location (e.X / e.Y) of the display not from the FlowLayoutPanel.

Where can i get the location of the dropped RadPanel?

Another question: Is there an event of moving the dragged RadPanel? I didn“t found that. I need this for animation / show the dragged RadPanel.

Best regards, Martin

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Jan 2020
3 answers
119 views

Hi,

I've a problem with my CellFormating.
More precisely with "FormatString" which does not work properly.

I filled my RadGridView with the help of a list.
Everything is working properly.
Here is a bit of my implementation:

Public Class Liste_DossiersVO
 
   '...
   Private dvo_prix_public As String
   '...
 
   Public Property Prix_Public() As String
       Get
           Return dvo_prix_public
       End Get
       Set(value As String)
           dvo_prix_public = value
       End Set
   End Property
 
   Public Sub New(...,
                  Prix_Public As String,
                  ...)
       Me.Prix_Public = Prix_Public
   End Sub
 
   Default Public ReadOnly Property Item(ByVal i As Integer) As Object
       Get
           Select Case i
               ...
               Case 6
               ...
               Case Else
                   Return [String].Empty
           End Select
       End Get
   End Property
    
End Class
 
 
 
 
 
Public Sub Binding_Liste_DossiersVO()
       Using db As New NpgsqlConnection
               Dim sql As NpgsqlCommand = db.CreateCommand()
               Try
                   db.ConnectionString = ParamSQL
                   db.Open()
 
                   If db.State = ConnectionState.Open Then
 
                       sql.Parameters.Clear()
                       sql.CommandType = CommandType.Text
 
                       sql.CommandText = "SELECT ...
                                     FROM "...;"
 
                       Dim reader As IDataReader = sql.ExecuteReader()
                       Data_GridView_VO.Clear()
                       While reader.Read()
 
                       Dim LVO As New Liste_DossiersVO(Convert.ToString(reader(0)),
                                                           Convert.ToString(reader(1)), 
                                                           Convert.ToString(reader(2)), 
                                                           Convert.ToString(reader(3)), 
                                                           Convert.ToString(reader(4)), 
                                                           Convert.ToString(reader(5)), 
                                                           Convert.ToString(reader(6)),  'dvo_prix_public --> Prix_Public
                                                           Convert.ToString(reader(7))) 
 
                       Data_RadGridView1.Add(LVO)
 
                       End While
                   End If
               db.Close()
               Catch ex As Exception
                   db.Close()
                   ErrorBox.RadTextBoxControl1.Text = ex.ToString
                   ErrorBox.Show()
               End Try
       End Using
   End Sub
    
    
    
   Public Sub BindToRadGridView1()
       Home.GridView_VO.MasterTemplate.AllowAddNewRow = False
       Home.GridView_VO.MasterTemplate.AutoGenerateColumns = False
       Home.GridView_VO.DataSource = Nothing
       Home.GridView_VO.TableElement.BeginUpdate()
       Home.GridView_VO.MasterTemplate.Columns.Clear()
       '...
       Home.GridView_VO.MasterTemplate.Columns.Add(New GridViewDecimalColumn("PRIX PUBLIC", "Prix_Public"))
 
       For i As Integer = 0 To Home.GridView_VO.MasterTemplate.Columns.Count - 1
           Home.GridView_VO.MasterTemplate.Columns(i).Width = 150
       Next i
 
       Home.GridView_VO.TableElement.EndUpdate(False)
       Home.GridView_VO.DataSource = Data_GridView_VO
   End Sub

 

Then when I try to format the display of my 6th column with my currency format it doesn't work.
The rest works well.
For example, a color change works without problems.
Also, if I add € to "{0: C}" -> "{0: C} €" the currency sign looks good but the formatting is not the right one -> € 1,250.00
The correct form should be € 1,250.00

I tried several implementation attempts but never got the right result :

 

Private Sub RadGridView1_CellFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellFormattingEventArgs) Handles RadGridView1.CellFormatting
    If e.CellElement.ColumnInfo.Name = "PRIX PUBLIC" Then
        If e.CellElement.Text <> "" Then
            e.CellElement.Text = String.Format(New CultureInfo("fr-FR"), "{0:C}", e.CellElement.Value)
        End If
    End If
End Sub

Or simple

Me.RadGridView1.Columns(6).FormatInfo = CultureInfo.CreateSpecificCulture("fr-FR")
Me.RadGridView1.Columns(6).FormatString = "{0:C}"

 

Doesn't work.

 

Do you have any idea?

A solution ?
Thank you.

 

Nadya | Tech Support Engineer
Telerik team
 answered on 07 Jan 2020
1 answer
155 views

Greetings,

With the code below (from Telerik Winforms demo app), it is possible to export radtreeview data to different formats.

 

Imports Microsoft.VisualBasic
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports Telerik.WinControls
Imports Telerik.WinControls.Enumerations
Imports Telerik.WinControls.Export
Imports Telerik.WinControls.UI
Imports Telerik.WinControls.UI.Export
 
Namespace ExportWithDpl.TreeView
    Public Partial Class Form1
        Inherits RadForm
        Public Sub New()
            InitializeComponent()
            Me.LoadTreeData()
            Me.WireEvents()
            Me.SetupInitialSettings()
 
            If Program.themeName <> "" Then 'set the example theme to the same theme QSF uses
                ThemeResolutionService.ApplicationThemeName = Program.themeName
            Else
                ThemeResolutionService.ApplicationThemeName = "TelerikMetro" 'set default theme
            End If
        End Sub
 
        Private Sub LoadTreeData()
            Me.radTreeView1.Nodes.Add(New RadTreeNode("Personal Folders", Image.FromFile("..\TreeView\Images\Root.png")))
            Me.radTreeView1.Nodes(0).Nodes.Add(New RadTreeNode("Deleted Items", Image.FromFile("..\TreeView\Images\RecycleBin.png")))
            Me.radTreeView1.Nodes(0).Nodes.Add(New RadTreeNode("Drafts", Image.FromFile("..\TreeView\Images\DraftFolder.png")))
            Me.radTreeView1.Nodes(0).Nodes.Add(New RadTreeNode("Inbox", Image.FromFile("..\TreeView\Images\InboxFolder.png")))
            Me.radTreeView1.Nodes(0).Nodes.Add(New RadTreeNode("Junk E-mails", Image.FromFile("..\TreeView\Images\JunkFolder.png")))
            Me.radTreeView1.Nodes(0).Nodes.Add(New RadTreeNode("Outbox", Image.FromFile("..\TreeView\Images\OutboxFolder.png")))
            Me.radTreeView1.Nodes(0).Nodes.Add(New RadTreeNode("Sent Items", Image.FromFile("..\TreeView\Images\SentFolder.png")))
            Me.radTreeView1.Nodes(0).Nodes.Add(New RadTreeNode("Search Folder", Image.FromFile("..\TreeView\Images\SearchFolder.png")))
            Me.radTreeView1.Nodes(0).Nodes.Add(New RadTreeNode("New Item", Image.FromFile("..\TreeView\Images\SentFolder.png")))
 
            Me.radTreeView1.Nodes(0).Nodes(2).Nodes.Add(New RadTreeNode("Folders", Image.FromFile("..\TreeView\Images\Folder1.png")))
            Me.radTreeView1.Nodes(0).Nodes(6).Nodes.Add(New RadTreeNode("From Follow up", Image.FromFile("..\TreeView\Images\SearchFolder.png")))
            Me.radTreeView1.Nodes(0).Nodes(6).Nodes.Add(New RadTreeNode("Large Mail", Image.FromFile("..\TreeView\Images\SearchFolder.png")))
            Me.radTreeView1.Nodes(0).Nodes(6).Nodes.Add(New RadTreeNode("Unread Mail", Image.FromFile("..\TreeView\Images\SearchFolder.png")))
 
            Me.radTreeView1.TreeViewElement.AutoSizeItems = False
            Me.radTreeView1.ItemHeight = 25
            Me.radTreeView1.ExpandAll()
        End Sub
 
        Private Sub WireEvents()
            AddHandler Me.exportButton.Click, AddressOf exportButton_Click
            AddHandler Me.allowAlternatingRowColorCheckBox.ToggleStateChanged, AddressOf allowAlternatingRowColorCheckBox_ToggleStateChanged
        End Sub
 
        Private Sub SetupInitialSettings()
            Me.exportVisualSettingsCheckBox.ToggleState = ToggleState.On
            Me.exportImagesCheckBox.ToggleState = ToggleState.On
            Me.groupChildNodesCheckBox.ToggleState = ToggleState.On
            Me.exportFormatXlsxRadioButton.ToggleState = ToggleState.On
            Me.collapsedOptionExportAlwaysRadioButton.ToggleState = ToggleState.On
        End Sub
 
        Private Sub allowAlternatingRowColorCheckBox_ToggleStateChanged(ByVal sender As Object, ByVal args As StateChangedEventArgs)
            Me.radTreeView1.TreeViewElement.AllowAlternatingRowColor = args.ToggleState = ToggleState.On
        End Sub
 
        Private Sub exportButton_Click(ByVal sender As Object, ByVal e As EventArgs)
            Dim exporter As TreeViewSpreadExport = New TreeViewSpreadExport(Me.radTreeView1)
 
            Dim dialog As SaveFileDialog = New SaveFileDialog()
            dialog.FileName = "exportedFile"
            If Me.exportFormatXlsxRadioButton.ToggleState = ToggleState.On Then
                exporter.ExportFormat = SpreadExportFormat.Xlsx
                dialog.Filter = "xlsx files (*.xlsx)|*.xlsx|All files (*.*)|*.*"
            ElseIf Me.exportFormatPdfRadioButton.ToggleState = ToggleState.On Then
                exporter.ExportFormat = SpreadExportFormat.Pdf
                dialog.Filter = "pdf files (*.pdf)|*.pdf|All files (*.*)|*.*"
            ElseIf Me.exportFormatCsvRadioButton.ToggleState = ToggleState.On Then
                exporter.ExportFormat = SpreadExportFormat.Csv
                dialog.Filter = "csv files (*.csv)|*.csv|All files (*.*)|*.*"
            ElseIf Me.exportFormatTxtRadioButton.ToggleState = ToggleState.On Then
                exporter.ExportFormat = SpreadExportFormat.Txt
                dialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
            End If
 
            If dialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
                If Me.customizeVisualSettingsCheckBox.ToggleState = ToggleState.On Then
                    AddHandler exporter.CellFormatting, AddressOf exporter_CellFormatting
                End If
 
                exporter.ExportVisualSettings = Me.exportVisualSettingsCheckBox.ToggleState = ToggleState.On
                exporter.ExportImages = Me.exportImagesCheckBox.ToggleState = ToggleState.On
                exporter.ExportChildNodesGrouped = Me.groupChildNodesCheckBox.ToggleState = ToggleState.On
 
                If Me.collapsedOptionExportAlwaysRadioButton.ToggleState = ToggleState.On Then
                    exporter.CollapsedNodeOption = HiddenOption.ExportAlways
                ElseIf Me.collapsedOptionDoNotExportRadioButton.ToggleState = ToggleState.On Then
                    exporter.CollapsedNodeOption = HiddenOption.DoNotExport
                ElseIf Me.collapsedOptionExportAsHiddenRadioButton.ToggleState = ToggleState.On Then
                    exporter.CollapsedNodeOption = HiddenOption.ExportAsHidden
                End If
 
                Dim renderer As SpreadExportRenderer = New SpreadExportRenderer()
                exporter.RunExport(dialog.FileName, renderer)
            End If
        End Sub
 
        Private Sub exporter_CellFormatting(ByVal sender As Object, ByVal e As TreeViewSpreadExportCellFormattingEventArgs)
            If e.TreeNode.Nodes.Count > 0 Then
                e.ExportCell.BackColor = Color.LightBlue
                e.ExportCell.ForeColor = Color.DarkMagenta
                e.ExportCell.Font = New Font("SegoeUI", 12, FontStyle.Underline)
            Else
                e.ExportCell.BackColor = Color.LightYellow
            End If
        End Sub
    End Class
End Namespace

 

How can I modify the code to only include Checked nodes of the radtreeview when exporting ,for example, to Excel format ?

(checkbox value of the radtreeview is set to True)

 

Thanks in advance.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Jan 2020
1 answer
111 views

Hello,

we use WinForms-Controls in our application and want to drop a WPF-Control to it (Listview or Panel).

But we don“t get the Drop-Event to it. :-(

In WinForms the DragEventArgs are in the namespace "System.Windows.Forms" and in WPF it is only "System.Windows", maybe this is the problem!?

Another problem: When we use a non-Telerik-form we can handle the Drop-Event but we can“t access the data from e.Data.GetData(...

It“s always null. Is there a way to control the data which is used for Drag&Drop?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Jan 2020
1 answer
86 views

 I have a video recording of the bug: https://youtu.be/dw8YDnO5njs

I have a RowFormatting event; if there is an error, I set the row Red and debug.writeline 'Error'. If the value is changed, I make it green and write out 'Changed'.

See the video; here's the debug output for all RowValidation events:

  • dragercode: Ok
    dragercode: Ok
    dragercode: Ok
    voornaam: Ok
    voornaam: Ok
    voornaam: Ok
    dragercode: Ok
    dragercode: Ok
    dragercode: Ok
    tusenvoegsel: Ok
    achternaam: Ok
    afdeling: Ok
    indienst: Ok
    uitdienst: Changed
    status: Changed
    opmerking: Ok
    wisselkastgroep: Ok
    wisselkastvak: Ok
    kledingkastgroep: Ok
    kledingkastvak: Ok
    emailadres: Ok

Yet, you see that 'uitdienst' is just white. When I mouse-over or click, it shows up with the green color.

Version 2018.3.907.4

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Jan 2020
7 answers
424 views

Hi,

I use Entity Framework (Database first) and want display a table with millions of data in a paged Radgridview.

It is not possible to load all data local with

dbContext.MyTable.Load();
radGridView1.DataSource = dbContext.MyTable.Local.ToBindingList();

Is there an example, which also support sorting and filtering  of the Radgridview?

Thank you,

Peter

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Jan 2020
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?