SfNumericTextBox not formatted correctly when inline editing

Hello,

I have a very simple column defined like this :

<GridColumn Field=@nameof(Division.DivisionId) HeaderText="ID" Type="ColumnType.Number" Format="#######" TextAlign="TextAlign.Left" Width="40" AllowEditing="true"></GridColumn>

This displays correctly according to the Format = "######"



But when double clicking to start editing it appears like this:


How do I get rid of the comma that has appeared now?


Thanks


3 Replies

KG Keerthana Ganesan Syncfusion Team September 26, 2022 03:58 PM UTC

Hi Sheldon,

Greetings from Syncfusion support.

Query: SfNumericTextBox does not format correctly when inline editing.


We have analyzed your query and we suggest you use the EditParams feature of Grid to overcome the reported issue. Also, we have made a solution file based on your requirements. We have discussed this similar topic in our UG documentation kindly refer to the attached documentation and solution file for your reference.

<GridColumn Field=@nameof(Order.Freight) HeaderText="Freight"  EditType="EditType.NumericEdit" EditorSettings="@FreightEditParams" TextAlign="TextAlign.Center" Width="130"></GridColumn>



public IEditorSettings FreightEditParams = new NumericEditCellParams

    {

        Params = new NumericTextBoxModel<object> () { Format="######" ,ShowClearButton= true, ShowSpinButton = true }

    };




Reference link: https://blazor.syncfusion.com/documentation/datagrid/cell-edit-types#numericedit

Kindly get back to us if you have any further queries.

Regards,
Keerthana.


Attachment: EditParam_170728eb.zip


SH Sheldon September 26, 2022 04:09 PM UTC

Works like a charm. I will add though that sometimes your documentation can be a bit difficult to navigate. Why, for example is this not mentioned in the inline editing section?



VN Vignesh Natarajan Syncfusion Team September 27, 2022 04:11 PM UTC

Hi Sheldon,


Thanks for the update.


We are glad to hear that you have resolved your query using our solution. Topics under cell edit types are applicable for all edit modes (inline, dialog, and batch mode also). hence we have documented this in a separate topic.


Please get back to us if you have further queries.


Regards,

Vignesh Natarajan


Loader.
Up arrow icon