Reproduction steps:
Observed behavior:
Expected behavior:
Hi Martin,
I agree that there are related. Both behaviors will be taken into account when the team starts working on this behavior. I have already related both items.
Regards,
Dinko
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
It is not a duplicate item. But it is related. I created both items so I kinda know.
The first bug is about clearing the editor while there is already data (with a backspace). In short: from something to nothing.
The second bug is about the editor "making up" data (zero) while the property is clearly null. In short: from nothing to something.
Hello Martin,
Thank you for the provided steps.
The reported behavior is related to the one which is already logged in our Feedback Portal. You can subscribe to the item so that you could get notified of its status change. In the meantime what I can suggest as a workaround is similar to the one shared in the feedback item. You can subscribe to the EditorInitialized event of the RadPropertyGrid. In the event handler, you can check the editor type and change the Text property of the editor if the incoming value is null.
private void RadPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
{
if (e.Editor is PropertyGridSpinEditor spinEdit)
{
if (spinEdit.EditorElement is BaseSpinEditorElement editorElement && editorElement.EnableNullValueInput)
{
if(string.IsNullOrWhiteSpace(e.ItemElement.Text))
{
editorElement.Text = null;
}
}
}
}
Regards,
Dinko
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.