This is a migrated thread and some comments may be shown as answers.

Grid InCell Editing with DropDowList with Decimal DataValueField

1 Answer 106 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Tim asked on 27 Jul 2017, 07:02 PM

I have a grid with an editor template like so:

@model decimal?


In my grid I have the column defined like so:

columns.Bound(p => p.VatRate).EditorTemplateName("DropDownListVatRates");


The VatRate property is defined like so:

public decimal VatRate { getset; }


What I would like is for select the appropriate VAT rate and for the DDL to pass the decimal value back to the cell (something like this )

But I can't figure out how to do it, any help would be appreciated?


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 01 Aug 2017, 10:34 AM
Hello Tim,

Thank you for the provided information.

After observing the code and the video, I can assume that the desired result is to show the selected decimal value instead of the rounded value like 1 or 2?

If this is correct I can suggest using the column.format property which will allow displaying the number in the desired way:

If the format is not applied, I can suggest using the ClientTemplate():

//decimalValue corresponds to the field
"#=kendo.toString(decimalValue, 'n5')#"

Let me know if I missed am an important detail.

Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question