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