We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Cell Numeric Edit

Thread ID:

Created:

Updated:

Platform:

Replies:

119146 May 14,2015 12:58 PM UTC May 15,2015 01:41 PM UTC ASP.NET MVC 1
loading
Tags: Grid
Andrea Perazzolo
Asked On May 14, 2015 12:58 PM UTC

Hi,
I am defining a grid with a column with EditType(EditingType.Numeric) To edit with the NumericTextBox editor.
The field is decimal type, but the editor allow me only to insert integer values.
I Noticed that there is a NumericEditOptions Helper in the Builder of the column.
I passed a Property of my Model of Type EditorProperties, in which I setted the Value of DecimalPlaces to 3.
The field keeps to allow only integer values, and doesn't accept the . and , characters.
Could you tell me what I am doing wrong and if is a problem to provide a workaround?
I have tried with the Inline and Dialog Type of Edit.

    Thanks in advance

    Andrea Perazzolo

Sellappandi Ramu [Syncfusion]
Replied On May 15, 2015 01:41 PM UTC

Hi Andrea,

Thanks for using Syncfusion products.

Could you please share the following information to sort out the cause of the issue and provide you with prompt solution?

1. Could you please check whether you are using the NumericEditOptions property to set the decimal place of the column?

2. Please share your full grid code snippet to us or issue reproducing sample it will help us to provide the better solution.

We have tested the reported issue in our side and we are unable to reproduce it. For your kind information, if we set EditingType as Numeric to grid column it will accept the integer value. When we edit the numeric column it won’t accept the. (Dot) and, (comma) symbol. If we like to edit the decimal value in numeric column we need to use the NumericEditOptions property in that particular column and need to set the decimal place value based on our requirement. By default the numeric edit text box will accept the. (Dot) symbol when set the decimal places and the numeric textbox will accept symbol based on the locale which we are set for grid. Please refer the following code snippet.


@(Html.EJ().Grid<MVCGridEditing.OrdersView>("FlatGrid")

.Datasource((IEnumerable<object>)ViewBag.datasource)

.AllowPaging() /*Paging Enabled*/

.EditSettings(edit=>{edit.AllowAdding().AllowDeleting().AllowEditing(); })

.ToolbarSettings(toolbar =>

{

….

})

.Columns(col =>

{

….

col.Field("Freight").HeaderText("Freight").TextAlign(TextAlign.Right).Width(75).EditType(EditingType.Numeric)

.NumericEditOptions(new EditorProperties() { DecimalPlaces = 3 }).Add();

}))


We have created a sample and it can be downloaded from below link:

Sample link: http://www.syncfusion.com/downloads/support/forum/119146/MVCGridEditing-1651957397.zip

Please try the above sample and get back to us with mentioned details, if the provided information does not meet you requirement.

Regards,
Sellappandi R

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;