Hi,
How to achieve the following behavior: I need to show the concrete child (string type) from the parent container:
<telerik:PropertyDefinition Binding="{Binding Container}">
<telerik:PropertyDefinition.NestedProperties>
<telerik:PropertyDefinition Binding="{Binding Children[0]}"/>
</telerik:RadPropertyGrid.PropertyDefinitions>
</telerik:PropertyDefinition>
It does not enter the Children collection.
I've tried to write the converter but the result - it shows combobox instead of textbox.
public class EnumerableConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var enumerable = (IEnumerable)value;
var index = 0;
var position = int.Parse((string) parameter);
var enumerator = enumerable.GetEnumerator();
while (enumerator.MoveNext())
{
if (index == position)
{
return enumerator.Current;
}
index++;
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
Thanks
How to achieve the following behavior: I need to show the concrete child (string type) from the parent container:
<telerik:PropertyDefinition Binding="{Binding Container}">
<telerik:PropertyDefinition.NestedProperties>
<telerik:PropertyDefinition Binding="{Binding Children[0]}"/>
</telerik:RadPropertyGrid.PropertyDefinitions>
</telerik:PropertyDefinition>
It does not enter the Children collection.
I've tried to write the converter but the result - it shows combobox instead of textbox.
public class EnumerableConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var enumerable = (IEnumerable)value;
var index = 0;
var position = int.Parse((string) parameter);
var enumerator = enumerable.GetEnumerator();
while (enumerator.MoveNext())
{
if (index == position)
{
return enumerator.Current;
}
index++;
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
Thanks