asp.net mvc - Kendo globalization: different cultures for widgets -



asp.net mvc - Kendo globalization: different cultures for widgets -

i have kendo grid incell editing mode , decimal column rate.

@(html.kendo().grid(model.contractcurrencyclauses) .name("contractcurrencyclauses") .columns(columns => { columns.bound(p => p.rate).clienttemplate("...").width(200); }) .editable(editable => editable.mode(grideditmode.incell)) .datasource(datasource => datasource.ajax() .model(model => { model.id(u => u.contract_id); }) .serveroperation(false)))

the problem when submitted form, got null rate if floating point number because of regional settings on pc, in case of integer ok. solved issue adding globalization in web.config:

<globalization culture="en-us" uiculture="ru-ru" />

but en-us civilization affects kendo widgets, kendo datepicker. tried apply ru-ru civilization or format datepicker editor template, not work:

@model datetime? <script src="~/scripts/kendo/cultures/kendo.culture.ru-ru.min.js"></script> @(html.kendo().datepickerfor(m => m).culture("ru-ru").format("dd.mm.yyyy"))

so, how can apply en-us civilization kendo grid only?

thanks lot.

you can utilize like

<script> kendo.culture("en-gb"); var civilization = kendo.culture(); culture.calendar.patterns.d = "dd mmm yyyy"; // short date pattern culture.calendar.patterns.d = "dd mmm yyyy"; // long date pattern culture.calendar.patterns.t = "hh:mm"; // short time pattern culture.calendar.patterns.t = "hh:mm"; // long time pattern culture.calendar.patterns.g = "dd mmm yyyy hh:mm"; culture.calendar.patterns.g = "dd mmm yyyy hh:mm"; culture.numberformat.currency.symbol = "$"; </script>

and can format number , decimals also.

hope help you

asp.net-mvc kendo-ui globalization kendo-asp.net-mvc culture

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -