Telerik Forums
UI for WinForms Forum
1 answer
160 views

     Hello,

When using a VisualStudio2012Dark themed GridView with ColumnHeader, GroupPanel, and AddNewRow turned off, the top border of the grid is missing. It only appears with a border width that is greater than 1.

To reproduce:

  1. Drop a RadGridView into a new form
  2. Change the form's theme to VisualStudio2012DarkTheme. Apply to all controls.
  3. Add the following to the form's load event
RadGridView1.ShowColumnHeaders = False
RadGridView1.ShowGroupPanel = False
RadGridView1.AllowAddNewRow = False
 
RadGridView1.Columns.Add("1")
RadGridView1.Columns.Add("2")
RadGridView1.Columns.Add("3")
 
RadGridView1.Rows.Add(1, 2, 3)
RadGridView1.Rows.Add(4, 5, 6)
RadGridView1.CurrentRow = Nothing
 
RadGridView1.TableElement.DrawBorder = True
RadGridView1.TableElement.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.SingleBorder
RadGridView1.TableElement.BorderGradientStyle = Telerik.WinControls.GradientStyles.Solid
RadGridView1.TableElement.BorderColor = Color.Yellow
RadGridView1.TableElement.BorderWidth = 1

 

I'm not sure if that is part of the theme, but either way I can't seem to add a single pixel border to the top.

 

Also, the description for TableElement.BorderWidth is incorrect; it says it is for the left border.

 

This is for R3 2018.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Mar 2021
9 answers
128 views

hi

i can change font FilterPopup but font "available filers" not changes

This section is marked in the photo below

 

moj
Top achievements
Rank 1
 answered on 04 Mar 2021
2 answers
206 views

hi

i tranaslte all word in  grid but "filter dialog" not ranslates

This section is marked in the photo below

 

moj
Top achievements
Rank 1
 answered on 27 Feb 2021
4 answers
236 views

Hello

I am trying to write a customEditor for a gridview to handle "rapid" data entry for grade values.

The grade values can be from 0 to 10 in steps of 0.5 (valid values are, for instance, 4 or 4.5, but not 4.1)
I wish to be able to type in the grades on the numerical keypad and on the main keyboard
where:typing a single character numeric value sets the value typed
and typing CTRL-num value sets the "halfed grade" (ex: type CTRL-4 for obtaining 4.5)
furthermoreI need to have the cursor positioned to the cell below imediately after the entry validation

The columns are currently text columns but could be numerical columns

I have tried using the followind code and Custom Editor:

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

    Private Sub gvMark_EditorRequired(sender As Object, e As EditorRequiredEventArgs) Handles gvMark.EditorRequired
        If e.EditorType Is GetType(RadTextBoxEditor) Then
            e.EditorType = GetType(MarkEditor)
        End If
    End Sub

Public Class MarkEditor
    Inherits RadTextBoxEditor
    Public Property Value As Object
        Get
            Dim Editor As RadTextBoxEditorElement = CType(EditorElement, RadTextBoxEditorElement)
            Return Editor.Text
        End Get
        Set(value As Object)
            Dim Editor As RadTextBoxEditorElement = CType(EditorElement, RadTextBoxEditorElement)
            If value IsNot Nothing Then
                Editor.Text = Convert.ToString(value)
            Else
                Editor.Text = ""
            End If
        End Set
    End Property
    Public Overrides Sub BeginEdit()
        MyBase.BeginEdit()
        Me.EditorElement.Focus()
        Dim EditorElement As RadTextBoxEditorElement = CType(Me.EditorElement, RadTextBoxEditorElement)
        AddHandler EditorElement.KeyDown, AddressOf Element_KeyDown
    End Sub
    Public Overrides Function EndEdit() As Boolean
        MyBase.EndEdit()
        Me.EditorElement.Focus()
        Dim EditorElement As RadTextBoxEditorElement = CType(Me.EditorElement, RadTextBoxEditorElement)
        RemoveHandler EditorElement.KeyDown, AddressOf Element_KeyDown
        Return MyBase.EndEdit
    End Function
    Private Sub Element_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
        Try
            Dim KeyChar As String = fromKeyCode(e.KeyCode)
            If Not e.Control Then
                Value = KeyChar
            Else
                Value = KeyChar & ".5"
            End If
        Catch ex As Exception

        End Try
    End Sub

        Public Function fromKeyCode(KeyCode As Integer) As String
            'returns the caracters 0..9 for Keyboard Keys 0..9 and NumPadKeys 0..9 and "*" from NumPad "Multiply"
            Try
                If KeyCode >= 48 And KeyCode <= 57 Then '0..9 Keyboard
                    Return (KeyCode - 48)
                ElseIf KeyCode >= 96 And KeyCode <= 105 Then '0..9 NumPad
                    Return (KeyCode - 96)
                ElseIf KeyCode = 106 Then '* NumPad
                    Return "*"
                Else
                    Return ""
                End If
            Catch ex As Exception
                Return ""
            End Try
        End Function

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

I have a strange result (same result when using the keyboard or the numeric pad)

1. if I type a single numeric value -> it is displayed twice in the cell, i.e.if I type 4 I see 44 and the cursor is in the middle of the two characters

2. if I type CTRL-4 I get the desired 4.5 string in the cell

3. I have tried to add a sendkeys.send(vbcr) at different places (valueChanged, CellvalueChanged events unsuccessfully) to move the focus to the cell below

(Ultimately I'll have to do more advanced data validation based on other criterias)

Thanks in advance for any suggestion

Best Regards

pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 26 Feb 2021
1 answer
287 views

Hallo Admin,

here I have a problem when I want to give a line to the label series on the ChartView (DonutSeries),
in this case I want to label the line always up, even though the position of the chart data is below
which I have created is in the image (Chart_No.png)

and I want to make like the image (Chart_Yes.png)

this is the method that i have created.

private void DrawRadChartViewDonutChart(RadChartView p_oRadChart)
        {
            p_oRadChart.View.Margin = new Padding(20); //set pie padding
            p_oRadChart.AreaType = ChartAreaType.Pie; //set to pie chart type
            p_oRadChart.Series.Clear();

            #region Config New Chart Series
            Telerik.WinControls.UI.DonutSeries smartPie = new Telerik.WinControls.UI.DonutSeries();
            smartPie.Name = "Series";
            smartPie.InnerRadiusFactor = 0.45f; //setting inner radious doughnut so it can change as Doughnut Chart
            smartPie.LabelMode = PieLabelModes.Horizontal;
            smartPie.ShowLabels = true; //show label text
            smartPie.DrawLinesToLabels = true; //show label line connector

            smartPie.LinesToLabelsColor = Color.FromArgb(197, 156, 97); //set label line connector color
            smartPie.SyncLinesToLabelsColor = false; //set true if we want to set label line color the same as series color
            smartPie.Size = new Size(200, 200);
            //set angle range starting position
            AngleRange range = smartPie.Range;
            range.StartAngle = 250;
            smartPie.Range = range;

            #endregion

            #region Generate Data
            

            List<DataChart> lData = new List<DataChart>();
            lData.Add(new DataChart("Savings", 30));
            lData.Add(new DataChart("Deposit", 15));
            lData.Add(new DataChart("Credit", 15));
            lData.Add(new DataChart("BancaAssurance", 10));
            lData.Add(new DataChart("MutualFund", 10));
            lData.Add(new DataChart("Jasa Giro", 20));
            #endregion

            //add slice area
            foreach (DataChart d in lData)
            {
                PieDataPoint point = new PieDataPoint(Convert.ToDouble(d.Value), d.Name);
                point.Label = d.Name.ToUpper();
                point.Label = string.Format("{0} | {1}%{2}{3} {4}", d.Name.ToUpper(), d.Value, Environment.NewLine, "IDR", Convert.ToDouble(d.ValueRp).ToString("N0"));
                smartPie.DataPoints.Add(point);
            }
            p_oRadChart.Series.Add(smartPie);

            #region Setting Series Slice Color
            p_oRadChart.Series[0].Children[0].BackColor = Color.FromArgb(193, 152, 105);
            p_oRadChart.Series[0].Children[1].BackColor = Color.FromArgb(207, 175, 140);
            p_oRadChart.Series[0].Children[2].BackColor = Color.FromArgb(221, 198, 173);
            p_oRadChart.Series[0].Children[3].BackColor = Color.FromArgb(235, 221, 206);
            p_oRadChart.Series[0].Children[4].BackColor = Color.FromArgb(193, 152, 105);
            p_oRadChart.Series[0].Children[5].BackColor = Color.FromArgb(207, 175, 140);
            p_oRadChart.Series[0].IsVisible = true;
            #endregion
        }

please help, thank you

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Feb 2021
1 answer
282 views

Please provide a basic example (or a link to) of how to use the DesktopAlertManager.

I want to be able to display multiple alerts and stack them if they appear at the same time.

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Feb 2021
3 answers
200 views

We are in the early process of converting from VB to C#. Before we convert, we are turning on Option Strict, one project at a time. I got the following Late Binding error on a RadDropDownList.DataSource. DataSource is deemed as an object (line 09 & 14), which is what is throwing the error, but not sure how to repair this. (error screenshot attached)

01.Public Shared Function IndexOfKeyOrValue(ByRef ddl As RadDropDownList, ByVal myString As String, ByVal LocateKey As Boolean) As Integer
02.    ' What I would like to do is pass any control to this function, see if it has a datasource and then do the rest.
03.    ' Use the TypeOf to determine the type of the control
04.    'AddEvent("IndexOfKeyOrValue Looking For: " & myString & " in " & ddl.Name)
05.    Try
06.        For xx As Integer = 0 To ddl.Items.Count
07.            'AddEvent(ddl.DataSource(xx).Key & "  " & ddl.DataSource(xx).Value)
08.            If LocateKey Then
09.                If ddl.DataSource(xx).Key = myString Then
10.                    'AddEvent("---- Index Found = " & xx)
11.                    Return xx
12.                End If
13.            Else
14.                If ddl.DataSource(xx).Value = myString Then
15.                    'AddEvent("---- Index Found = " & xx)
16.                    Return xx
17.                End If
18.            End If
19. 
20.        Next
21.    Catch ex As Exception
22.        ' AddEvent("---- NOT FOUND Index = -1")
23.        Return -1
24.    End Try
25.End Function  'IndexOfKeyOrValue
Nadya | Tech Support Engineer
Telerik team
 answered on 25 Feb 2021
4 answers
387 views

Hello team,

 

i got a RadRibbonBar, with RibbonBarGroups in it and one of the RadRibbonBarGroups contains a RadTextBoxElement. Im currently failing at the following goal:

- i want to catch the moment when the textbox looses the mouse focus.

Im using the MouseDown event to initiate the user interaction with the textbox and now i want an oposite to that, so that i can recognize if the user has "mousedowned" any other control on the screen.

I tried the MouseLeave event which seems not to be the totaly right thing, but still better than nothing - this even fires from time to time but i cant tell on which exact condition. Moving the mouse away from the textbox does not always trigger it.

The MouseLostCapture event - not sure if its right at all - didnt trigger even once.

Please tell what event should i use for my need?

 

Thank you!

 

 

 

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 25 Feb 2021
8 answers
584 views
Hi,
I have a need to create a list of items from a grid using only the rows that are displayed (not filtered).  I tried to use the RowInfo.IsVisible property but it seems that all rows "IsVisible" is set to true even if the row is not visible due to it being filtered out.

The scenario is; The user creates a filter on a gird and then clicks a button (or whatever to trigger an event) and then the program needs to be able to get values from just the un-filtered rows.

Does anyone know how this can be done?

Thanks,
Mike B.

Update:
After more testing, the IsVisible does seem to be set to false for rows that are filtered out.
Sorry for "jumping the gun".

Mike B
Pioter
Top achievements
Rank 1
 answered on 25 Feb 2021
21 answers
664 views

Is it possible to properly display HTML that was exported from a RadRichTextBox in a GridView cell?

The user is allowed to use many of RadRichTextBox's formatting features when entering data into a RadRichTextBox. This data is saved to the database using the HtmlFormatProvider.  I am currently saving the HTML as an HTML fragment with inline formatting.  The HTML is later pulled from the database and used to populate the RadRichTextBox. I am able to retain the HTML formatting with no problem.

However, the HTML is not formatted properly when displayed in a GridView. It is simply displayed as text, including all HTML tags.  Setting DisableHTMLRendering to false for the appropriate columns does not work.

I noticed that simple HTML displays correctly. For example, the following mark-up displays "text" in blue letters as expected:

"<html><color=0,0,255>text"

The following is a simple example of HTML exported from the RadRichTextBox using the HtmlFormatProvider:

<p style="margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px;"><span style="font-family: 'Times New Roman';font-style: normal;font-size: 16px;color: #0000FF;">Text</span></p>


 

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