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
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.
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,
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!
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 +
""
;
}
}
}
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 ?
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.