Telerik Forums
UI for WinForms Forum
7 answers
757 views
hello to all i m using rad control to making project  and database of mysql(odbc) now i want to give utility of  take backup and restore database how can i give send me some code for it.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Oct 2020
11 answers
201 views

Hello Telerik,

I linked a radPivotFieldList with a radPivotGrid. All of my radPivotFieldList's Controls used the CustomName expect the FieldList.

Is there any way to use Custom Name instead of Property Name ? 

 

I try this code too but it doesn't work
radPivotFieldList1.FieldsControl.Nodes[0].RootNode.Text="my text0";

Finally I try to remove a Node and adding another but it doesn't work because of the FielList is automaticaly updating after : 

                 Telerik.WinControls.UI.RadTreeNode test = new RadTreeNode(){Value =radPivotFieldList1.FieldsControl.Nodes[0].Value, Text="test" } ;

               radPivotFieldList1.FieldsControl.Nodes.Remove(radPivotFieldList1.FieldsControl.Nodes[0]);
               radPivotFieldList1.FieldsControl.Nodes.Add(test);

 

Best regards

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Oct 2020
2 answers
142 views

Hi guys,

Is it possible to change the RadFormTitleBarElement default context menu (Minimize, Maximize, Restore, etc.) for a customized one? I have seen that RadTitleBar has a ContextMenuProperty property exposed, but I cannot find it in my RadForm embebed title bar.

Thank you very much.

Joaquín
Top achievements
Rank 2
 answered on 30 Sep 2020
3 answers
240 views

Hi,

 

How can I do to have a simple RadRichTextEditor. See attached image please.

 

Best regards.

Eusebio.

Hristo
Telerik team
 answered on 30 Sep 2020
1 answer
54 views

I accidentally deleted a top level menu item in the RadMenu control on the main form of the project.  This action could not be undone.  Attempts to add the menu element back resulted in errors about duplicate entries.  VS2019 subsequently crashed and restarted.  Further attempts to open the main form of the application resulted in errors upon opening the form.

 

With all efforts to recover the form proving futile, I deleted the form and attempted to add a new RadForm to replace it.  However, instead of a new form being added only a VB code module is created.  It is now impossible to add any new type of RadForm to this project, though it is possible to create a new project.

 

Is there a known solution to this problem?  If not, then I will create a new project and main form and import the other project modules.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 29 Sep 2020
7 answers
2.9K+ views
Hi,

how can I hide the tabs from the PageViewControl?

best regards,

Jan
Troy
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 28 Sep 2020
1 answer
1.7K+ views

The grid does not seem to be subscribing to PropertyChanged on INotifyPropertyChanged. All the bound data objects provide INotifyPropertyChanged, but when they go to fire this event the event handler is null; meaning no one is listening. The grid keeps showing the old data until I select the row.

 

Here is code to reproduce it:

public partial class RadForm1 : RadForm
{
    private Timer _timer;
    private ObservableCollection<GridData> _data;
 
    public static bool GridBound = false;
 
    public RadForm1()
    {
        InitializeComponent();
    }
 
    protected override void OnLoad( EventArgs e )
    {
        base.OnLoad( e );
 
        var gv = new RadGridView();
        gv.Dock = DockStyle.Fill;
        Controls.Add( gv );
 
        _data = new ObservableCollection<GridData>()
        {
            new GridData { First = "A", Second = "B", Third = "C" },
            new GridData { First = "AA", Second = "BB", Third = "CC" },
            new GridData { First = "AAA", Second = "BBB", Third = "CCC" }
        };
        gv.DataSource = _data;
        GridBound = true;
 
        _timer = new Timer();
        _timer.Tick += _timer_Tick;
        _timer.Interval = 1000;
        _timer.Start();
    }
 
    private void _timer_Tick( object sender, EventArgs e )
    {
        _data[0].First = "D";
        _data[1].Second = "EE";
        _data[2].Third = "FFF";
 
        _timer.Stop();
    }
 
    private class GridData : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged( string name )
        {
            if( PropertyChanged == null && RadForm1.GridBound )
            {
                Debug.WriteLine( $"PropertyChanged is null, grid has not subscribed! Name = '{name}'" );
            }
 
            PropertyChanged?.Invoke( this, new PropertyChangedEventArgs( name ) );
        }
 
        private string _first;
        private string _second;
        private string _third;
 
        public string First { get => _first; set { _first = value; OnPropertyChanged( "First" ); } }
        public string Second { get => _second; set { _second = value; OnPropertyChanged( "Second" ); } }
        public string Third { get => _third; set { _third = value; OnPropertyChanged( "Third" ); } }
    }
}
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Sep 2020
7 answers
215 views

Hi Admin,

I want to know how to change font for dropdownlist and I put valuemember and displaymember for dropdownlist but after I choose gridview column show valuemember but I don't want . I want dispalymember. One column will be datatime column or textbox column or dropdownlist. 

Below My coding .

 

Imports System
Imports System.Collections.Generic
Imports System.Data
Imports Telerik.WinControls.UI

Public Class RadForm1
    Private Sub RadForm1_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load
        With RadGridView1.Columns
            .Add(New GridViewTextBoxColumn("EntityFilingDetailsID") With {.HeaderText = "EntityFilingDetailsID", .IsVisible = False, .VisibleInColumnChooser = False})
            .Add(New GridViewTextBoxColumn("ReportHeading") With {.HeaderText = "Report Heading"})
            .Add(New GridViewTextBoxColumn("FilingDetail") With {.HeaderText = "Filing Detail"})
            .Add(New GridViewTextBoxColumn("EntityFilingValue") With {.HeaderText = "EntityFilingValue"})
            .Add(New GridViewTextBoxColumn("Editor") With {.HeaderText = "EntityFilingValue", .IsVisible = False})
            .Add(New GridViewTextBoxColumn("FieldDataType") With {.HeaderText = "FieldDataType", .IsVisible = False, .VisibleInColumnChooser = False})
            .Add(New GridViewTextBoxColumn("DropDownListData") With {.HeaderText = "DropDownListData", .IsVisible = False, .VisibleInColumnChooser = False})
            .Add(New GridViewTextBoxColumn("IsReadOnly") With {.HeaderText = "IsReadOnly", .IsVisible = False, .VisibleInColumnChooser = False})
        End With

        Dim listofEntityFilingDetails As New List(Of EntityFilingDetails)
        Dim entityFilingDetails As New EntityFilingDetails
        entityFilingDetails.EntityFilingDetailsID = 1
        entityFilingDetails.ReportHeading = "Directed and managed in BVI (Y/N)"
        entityFilingDetails.FilingDetail = "Is the activity directed and managed in the Virgin Islands?"
        entityFilingDetails.EntityFilingValue = "Y"
        entityFilingDetails.FieldDataType = "DropDownList"
        entityFilingDetails.DropdownListData = "Y | N"
        entityFilingDetails.IsReadonly = False
        listofEntityFilingDetails.Add(entityFilingDetails)
        entityFilingDetails = New EntityFilingDetails
        entityFilingDetails.EntityFilingDetailsID = 2
        entityFilingDetails.ReportHeading = "Num Board Meetings"
        entityFilingDetails.FilingDetail = "Number of board meetings the entity held during the financial period with relation to this activity."
        entityFilingDetails.EntityFilingValue = ""
        entityFilingDetails.FieldDataType = "TextBox"
        entityFilingDetails.DropdownListData = ""
        entityFilingDetails.IsReadonly = False
        listofEntityFilingDetails.Add(entityFilingDetails)
        entityFilingDetails = New EntityFilingDetails
        entityFilingDetails.EntityFilingDetailsID = 3
        entityFilingDetails.ReportHeading = "Financial Period Start Date (DD/MM/YYYY)"
        entityFilingDetails.FilingDetail = "Financial Period Start Date"
        entityFilingDetails.EntityFilingValue = ""
        entityFilingDetails.FieldDataType = "DateTimePicker"
        entityFilingDetails.DropdownListData = ""
        entityFilingDetails.IsReadonly = False
        listofEntityFilingDetails.Add(entityFilingDetails)

        entityFilingDetails = New EntityFilingDetails
        entityFilingDetails.EntityFilingDetailsID = 4
        entityFilingDetails.ReportHeading = "Num Board Meetings"
        entityFilingDetails.FilingDetail = "Number of board meetings the entity held during the financial period with relation to this activity."
        entityFilingDetails.EntityFilingValue = "1"
        entityFilingDetails.FieldDataType = "DropDownList"
        entityFilingDetails.DropdownListData = "Countries"
        entityFilingDetails.IsReadonly = True
        listofEntityFilingDetails.Add(entityFilingDetails)
        RadGridView1.DataSource = listofEntityFilingDetails
    End Sub

    Private Sub RadGridView1_EditorRequired(sender As Object, e As EditorRequiredEventArgs) Handles RadGridView1.EditorRequired
        Dim dataRow As GridViewDataRowInfo = TryCast(Me.RadGridView1.CurrentRow, GridViewDataRowInfo)

        If dataRow Is Nothing Then
            Return
        End If

        Dim editor As String = Convert.ToString(dataRow.Cells("FieldDataType").Value)
        Dim DropdownListData As String = Convert.ToString(dataRow.Cells("DropdownListData").Value)
        Dim editorType As Type = e.EditorType

        Select Case editor
            Case "TextBox"
                editorType = GetType(RadTextBoxEditor)
            Case "DateTimePicker"
                editorType = GetType(RadDateTimeEditor)
            Case "DropDownList"
                editorType = GetType(RadDropDownListEditor)
        End Select

        e.EditorType = editorType
    End Sub

    Private Sub radGridView1_CellEditorInitialized(sender As Object, e As GridViewCellEventArgs) Handles RadGridView1.CellEditorInitialized
        If TypeOf e.ActiveEditor Is RadDropDownListEditor Then
            Dim editor As RadDropDownListEditor = TryCast(e.ActiveEditor, RadDropDownListEditor)
            Dim element As RadDropDownListEditorElement = TryCast(editor.EditorElement, RadDropDownListEditorElement)
            Dim DropdownListData As String = Convert.ToString(RadGridView1.CurrentRow.Cells("DropdownListData").Value)
            If DropdownListData = "Y | N" Then
                Dim dt As DataTable = New DataTable()
                dt.Columns.Add("Question")
                dt.Rows.Add("Y")
                dt.Rows.Add("N")
                element.DataSource = dt
                element.DisplayMember = "Question"
                element.ValueMember = "Question"
            Else
                Dim dt As DataTable = New DataTable()
                dt.Columns.Add("CountryName")
                dt.Columns.Add("CountryID")
                dt.Rows.Add("Myanmar", "1")
                dt.Rows.Add("Singapore", "2")
                element.DisplayMember = "CountryID"
                element.ValueMember = "CountryName"
                element.DataSource = dt
            End If
        End If
    End Sub
    Private Sub radGridView1_CellFormatting(ByVal sender As Object, ByVal e As CellFormattingEventArgs) Handles RadGridView1.CellFormatting
        If TypeOf e.CellElement.RowInfo Is GridViewDataRowInfo AndAlso e.Column.Name = "EntityFilingValue" Then
            Dim dateformat As DateTime
            If e.CellElement.RowInfo.Cells("EntityFilingValue").Value IsNot Nothing Then
                If DateTime.TryParse(e.CellElement.RowInfo.Cells("EntityFilingValue").Value.ToString(), dateformat) Then
                    e.CellElement.Text = dateformat.ToString("d MMMM yyyy")
                End If

                If CType(e.Row.Cells("IsReadonly").Value, Boolean) Then
                    e.CellElement.RowInfo.Cells("EntityFilingValue").ReadOnly = True
                Else
                    e.CellElement.RowInfo.Cells("EntityFilingValue").ReadOnly = False
                End If
            End If

            End If



    End Sub
End Class

Public Class EntityFilingDetails
    Property EntityFilingDetailsID As Integer
    Property ReportHeading As String
    Property FilingDetail As String
    Property EntityFilingValue As String
    Property FieldDataType As String
    Property DropdownListData As String
    Property IsReadonly As Boolean

End Class

 

 

 

 


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Sep 2020
1 answer
449 views

Is there also a JSON tagger for the SyntaxEditor available?

Thanks,

Ben

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Sep 2020
4 answers
126 views

Hi,

 

I'm trying to implement a behavior that will enable me to "check" each page of a pageview. The purpose of this is to define witch pages an user can access.

 

Basically I want to replace the close button with a checkbox, and then somehow be able to write to the console what pages are checked.

 

Thanks in advance!

Nicklas
Top achievements
Rank 1
Veteran
 answered on 23 Sep 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?