Telerik Forums
UI for WinForms Forum
4 answers
636 views

I collapse some groups of RadPropertyGrid programmatically, but it's don't work. Those groups collapse, but I can't expand it with the mouse. those appear as disabled.

 

        #region RPG: CONFIGURACION DE GRUPOS----------------------ini

        private void rpgMaquina_CustomGrouping(object sender, PropertyGridCustomGroupingEventArgs e)
        {
            switch (e.Item.Category)
            {
                case "General": e.GroupKey = 0; e.Handled = true; break;
                case "Inventario": e.GroupKey = 1; e.Handled = true; break;
           
                case "Pares de apriete": e.GroupKey = 2; e.Handled = true; break;
                case "Accesorios": e.GroupKey = 3; e.Handled = true; break;

                default:
                    break;
            }


        }

        private void rpgMaquina_ItemFormatting(object sender, PropertyGridItemFormattingEventArgs e)
        {
            PropertyGridGroupItem groupItem = e.Item as PropertyGridGroupItem;
            if (groupItem != null)
            {
                e.Item.Label = groupItem.GridItems[0].Category;
                if (e.Item.Label == "Inventario" || e.Item.Label == "Accesorios")
                {
                    groupItem.Collapse();
                    //groupItem.Enabled = true;

                }

            }
        }
        #endregion RPG: CONFIGURACION DE GRUPOS-------------------fin

Nadya | Tech Support Engineer
Telerik team
 answered on 01 Dec 2020
1 answer
111 views

Hello all,

 

i am trying to follow the official tutorial considering custom items for the RadPropertyGrid (https://docs.telerik.com/devtools/winforms/controls/propertygrid/custom-items) in a Progress Openedge 11.7 environment. I set up a test project consisting of a Form that holds a RadPropertyGrid and a Button whose Click Event will set the SelectedObject of the RadPropertyGrid. All other classes are more or less exactly translated into OpenEdge code from the tutorial.

The problem appears to be the assignment of the "ItemElementType" in the custom CreateItemElement

On the line "e:ItemElementType = TypeHelper:GetType("CustomItemElement")." the client begins to fire the event again and cause an infinit loop of event calls.

 

I could provide the sample project as .7zip if you like. 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Nov 2020
4 answers
422 views

Hi,

 

I need to change the default edit format of a DateTime field in the RadPropertyGrid.

Currently, the mask is presented as "Saturday, September 19, 2020", but I want it to be "19/09/2020" (day / month / year)

 

Best regards,


Nadya | Tech Support Engineer
Telerik team
 answered on 21 Oct 2020
9 answers
233 views

Hi all,

I'm trying to customize an item,but I'm stuck, I hope someone could help...

What I need is to show inside my PropertyGrid a value (a string) with a button aside (the typical [...] ).

Clicking the button will open up a custom form, from which a new value can be selected.

So something like the following code, which I've found in another thread:

private void RadPropertyGrid1_EditorRequired(object sender, PropertyGridEditorRequiredEventArgs e)
        {
            if (e.Item.Name == "DatoStringa")
            {
                var editor = new PropertyGridBrowseEditor();
                var el = editor.EditorElement as RadBrowseEditorElement;
                el.DialogType = BrowseEditorDialogType.FolderBrowseDialog;
                e.Editor = editor;
            }
        }

 

That's fine, but I need a brand new form, not a predefined one.

Is this possible?

Thank you!

 

Nadya | Tech Support Engineer
Telerik team
 answered on 07 Oct 2020
1 answer
169 views

Why does the PropertyGridDropDownListEditor automatically select the first option for me, is it possible to change this behavior?I want to keep things as they are when I have not chosen to.

public partial class RadForm1 : Telerik.WinControls.UI.RadForm
        {
        private class Info
            {
            [Editor(typeof(PropertyGridDropDownListEditor), typeof(BaseInputEditor))]
            public string Address { get; set; }
            }
 
        public RadForm1()
            {
            InitializeComponent();
            }
 
        private void RadForm1_Load(object sender, EventArgs e)
            {
            radPropertyGrid1.SelectedObject = new Info { Address = "B" };
            }
 
        private void radPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
            {
            PropertyGridDropDownListEditor ddl = e.Editor as PropertyGridDropDownListEditor;
            if (ddl != null)
                {
                BaseDropDownListEditorElement el = ddl.EditorElement as BaseDropDownListEditorElement;
                el.DataSource = new List<string> { "A", "B", "C" };
                el.Text = ((PropertyGridItem)e.Item).Value + "";
                }
            }
        }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Aug 2020
1 answer
111 views
The value of attribute X is 0.225, but when I click on attribute X it changes to 0.23, why is that?How to amend?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Aug 2020
4 answers
161 views

I create the PropertyGrid in Dock Window.

This Window has a size less then PropertyGrid.

But: the function  RadPropertyGrid1_CreateItemElement works for visible items only and all unvisible is not created and it is the reason of exception.
How to  force the RadPropertyGrid1_CreateItemElement  works for all items in the propertyGrid ?

 

 

Oleg
Top achievements
Rank 1
 answered on 13 Jul 2020
1 answer
104 views
There are times when I want certain property descriptions to change as other properties change. How to modify the value of an property description at runtime. Is this feasible? How is this achieved? Thank you!
Nadya | Tech Support Engineer
Telerik team
 answered on 29 May 2020
3 answers
678 views
how to achieve editable dropdownlist . i m using TypeConverter. code sample please 
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Mar 2020
1 answer
2.0K+ views

I have a class like,

        enum ConstraintType
            {
            Horizental,
            Vertial,
            Slope,
            Offset
            }

       class Constraint

{

ConstraintType First {get;set;}

ConstraintType Second {get;set;}

}

I know the enum will be dropdownlist on the propertygrid.

I hope the candidate enum values of Second is Slope and Offset when the First equals Vertical. 

I want to know how to display limited enum value in dropdownlist according to some other property.

Thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Feb 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
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
+128 more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?