Input Mask DoesNot Return Database Value With a Space Between The First Word and The Value

Dear Syncfusion,
My inquiry is about the Dialog Edit form not returning the saved value in the database in Edit Mode. When a Record is saved without a space; For Example; Senior2 and I click on the edit dialog form, the field (Class ) will return the database value as it is, but when I try editing a record with a space; For example Senior 8, and I click on the edit dialog form, the field (Class ) will not return the database value as it is but only returns the Section as I define it in my Mask field.

So I would like you to help me be able to return the database value that contains a space as it is in the database. For this case I want to return Senior 8.

I have attached the sample database table screenshot and the razor page such that you can help me achieve this.

Below is the the Mask Input

                            <GridColumn Field=@nameof(AClass.ClassName) HeaderText="Class" TextAlign="TextAlign.Left" Width="150">
                                <EditTemplate Context="MaskBox">                                   
                                    <SfMaskedTextBox Mask="\\Senior 9" @bind-Value="@((MaskBox as AClass).ClassName)" Placeholder="Mask \\A999 (ex: A321)"        FloatLabelType="@FloatLabelType.Always"></SfMaskedTextBox>
                                </EditTemplate>
                            </GridColumn>


Attachment: MaskEdit_4dec06c7.rar

1 Reply 1 reply marked as answer

PM Ponmani Murugaiyan Syncfusion Team January 21, 2021 05:18 PM UTC

Hi Ssekamatte, 

Greetings from Syncfusion support. 

Query: To return the database value that contains a space as it is in the database. 

We would like to inform you that space is invalid in mask format. So we suggest you to use the mark format as like below code snippet to achieve your reported case, which update the masked textbox with Senior 9 (with space). 

<SfMaskedTextBox Mask="\\Senior99" Value="Senior 9" Placeholder="Mask \\A999 (ex: A321)" FloatLabelType="@FloatLabelType.Always"></SfMaskedTextBox> 


Please get back us if you need further assistance. 

Regards, 
Ponmani M 


Marked as answer
Loader.
Up arrow icon