Telerik Forums
UI for WinForms Forum
3 answers
124 views

I want to implement the effect that highlight the matched text part of filtered node. The visual effect is just like the solution manager of visual studio. How can I do it? Thanks!

 
Steve
Top achievements
Rank 1
Veteran
 answered on 14 Jan 2020
3 answers
58 views

Hi,

In my program I have two virtual grids in the same form, viewable and usable simultaneously. By selecting elements in one grid you change what data is loaded into the other. For the sake of supplying more context-sensitive help, I had intended to replace the RadVirtualGridStringId.NoDataText string in the second grid with a more specific prompt depending on why no data is found. This works, but in the event that the first grid was unable to be populated with data, it needs to have different text to the second.

The Localization page explains how to change the LocalizationProvider for all virtual grids, but is there a way to set the provider of a specific instance of the grid?

Thanks

Hristo
Telerik team
 answered on 14 Jan 2020
6 answers
1.0K+ views
Hello

I have a small problem which I couldn't find any solution, even though it sounds so simple... The font in my RichTextEditor is too big (see the attached image for an example how it looks). I'm wondering how it's possible to change this font size to a smaller font. I tried several things such as

txtText.ChangeFontSize(4);

or

txtText.RichTextBoxElement.ChangeFontSize(4);

I couldn't find anything about it in the documentation. Is it even possible to change the displayed font size?

Best Regards,
Roman
Roman
Top achievements
Rank 1
Iron
 answered on 13 Jan 2020
1 answer
482 views

Hi,

 

I've recently added some simple data validation to my grid which are a bunch of checks that look rather like this:

if (Convert.ToInt32(e.Row.Cells["Category"].Value) == 0)
            {
                e.Cancel = true;
                e.Row.ErrorText = "Project Must have a Category";
            }

 

at the end of the rowformatting event I have this:

if (e.Cancel)
     {
         if (MessageBox.Show(e.Row.ErrorText, "ERROR", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
         {
             //TODO cancel row add
             //if (radGridView.MasterView.TableAddNewRow.IsCurrent)
             this.radGridView.MasterView.TableAddNewRow.CancelAddNewRow();
             radGridView.EndEdit();
         }
     }

 

This gets the focus out of the AddRow section. However when I click on any other row, the event fires... but the row that it's referencing is still the new row data, which means that I get the error message again and again and again! How do I properly cancel the AddRow so that the gridView can return to it's default behavior?

 

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Jan 2020
1 answer
104 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
160 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
189 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
268 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
315 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
90 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
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?