Declined
Last Updated: 12 Jan 2022 14:45 by improwise
improwise
Created on: 05 Jan 2022 23:56
Category: UI for Blazor
Type: Bug Report
1
Blazor Grid popup form does not honor displayformat

Hi,

 

It seems when using popup form editing with the DataGrid, the displayformat is lost even though it is displayed correctly in non edit mode. This seem to be true regardless if you specify it with Data Annotations of as DisplayFormat in markup. 

 

4 comments
improwise
Posted on: 12 Jan 2022 14:45

Hi,

I agree this isn't a bug, I assumed there was support for this already and thus classified it as such.

Is there a list of what data annotations is actually supported where in Telerik Blazor? What I have found you only link to Microsofts page about Data Annotation but that included the ApplyFormatInEditMode but obvioulsy it isn't supported. No need to report issues if you are already aware of them.

Thanks.

"Gets or sets a value that indicates whether the formatting string that is specified by the DataFormatString property is applied to the field value when the data field is in edit mode."

ADMIN
Svetoslav Dimitrov
Posted on: 12 Jan 2022 14:31

Hello Patrick,

The DisplayFormat addresses the format of the values in the cells of the Grid when they are in the normal "view/display" mode, not while being edited. 

Currently, to achieve the desired behavior you should use the EditorTemplate and provide a NumericTextBox, and set the Format there.

Furthermore, I have opened a new feature request on your behalf - The Grid and TreeList should support the ApplyFormatInEditMode setting. You are automatically subscribed to receive email notifications on status updates. I added your Vote on your behalf. 

That being said, the behavior you have reported is a missing feature rather than an existing bug, so I have changed the status to declined.

Regards,
Svetoslav Dimitrov
Progress Telerik

Learn about the important changes coming in UI for Blazor 3.0 in January 2022!
improwise
Posted on: 09 Jan 2022 00:26

Just for clarity, we also tried added ApplyFormatInEdit mode via Data Annotations but that didn't change anything

 

        [Display(Name = "Omsättning")]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:C}")]
        public long? Turnover { get; set; }
improwise
Posted on: 06 Jan 2022 00:05
This seems to be true in all forms of edit mode, not just popup. We have not been able to find a setting that we want to use DisplayFormat in edit mode as well but perhaps it exists?