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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Date Filter localization

Thread ID:

Created:

Updated:

Platform:

Replies:

118520 Mar 16,2015 11:35 AM UTC Mar 18,2015 07:33 AM UTC ASP.NET MVC 3
loading
Tags: Grid
Alessandro Garcia
Asked On March 16, 2015 11:35 AM UTC

I was able to localize the strings from grid and a stand-alone datepicker, but how can i localize the DatePicker from the Grid Filters?
Also, is there a way to set localization to all controls at once?

Thanks in advance.


Ragavee U S [Syncfusion]
Replied On March 17, 2015 08:48 AM UTC

Hi Alessandro,

We considered this query “Calendar inside Filter Menu for date column is not localized” as a bug and a support incident has been created under your account to track the status of this issue. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Query: is there a way to set localization to all controls at once

We suggest you to place the Grid localized values script section in master/layout page so that the localized values can be defined commonly for all the grid Controls used in the project and it can be used in view pages. Please refer the following code snippets

[In _layout.cshtml]

<script type="text/javascript

ej.Grid.locale["cs-CZ"] = {

EmptyRecord: "Žádné záznamy k zobrazení",

DeleteOperationAlert: "Žádné záznamy vybrané pro operace odstranění",

EditOperationAlert: "Žádné záznamy pro vybrané operace úprav",

SaveButton: "uložit",

CancelButton: "zrušit",

EditFormTitle: "Upravit údaje o",

Clear: "jasný",

};

ej.Pager.locale["cs-CZ"] = {

pagerInfo: "{0} od {1} strany ({2} příspěvky)"

};

</script>

[In View page]

@{

Layout = "~/Views/Shared/_Layout.cshtml";

}

We also suggest you to use the EditParams property of the column in order to set the localization for the sub controls used within the grid control. Please refer the below code snippet.

@(Html.EJ().Grid<object>("Grid")

. . . . .

.Locale("cs-CZ")

.Columns(col =>

{

col.Field("ID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Add();

col.Field("DatumAktivity").HeaderText("Datum Aktivity").Format("{0:dd.MM.yyyy}").EditType(EditingType.Datepicker).DateEditOptions(new Syncfusion.JavaScript.Models.DatePickerProperties() { Locale = "cs-CZ", ButtonText = "dnes" }).Add();

col.Field("TrvaniAktivity").HeaderText("Trvani Aktivity").Format("{0:c2}").EditType(EditingType.Numeric).NumericEditOptions(new Syncfusion.JavaScript.Models.EditorProperties() { DecimalPlaces = 2, Locale = "cs-CZ"}).Add();

})

)

Please let us know if we have misunderstood your requirement and get back to us with more and clear information on your requirement. The provided information will be helpful for us to analyze and provide you response accordingly.

Regards

Ragavee U S


Alessandro Garcia
Replied On March 17, 2015 12:43 PM UTC

Thanks for the answers.

When I try to use the DateEditOptions function i got an error "SyncFusion.Javascript.ColumnBuilder<object> does not contain a definition for 'DateEditOptions'". Is it in an especific reference? My version is the community edition.

About the second question, sorry if I was not very clear. What i want is to be able to set my locale in one place ( the web.config  globalization tag for example) so i don't need to set the .locale in all the controls (not only grids, Datepickers and others too).



Ragavee U S [Syncfusion]
Replied On March 18, 2015 07:33 AM UTC

Hi Alessandro,

Thanks for your update.

For your kind information, the DateEditOptions property is added to the grid columns and included in our Volume 4, Service Pack 2 release v12.4.0.34. So if you are using a lower version than 12.4.0.34, you will be confronting the error mentioned(if you try adding the DateEditOptions property to the grid column).

And thus we suggest you to upgrade tothe latest version ofEssential Studio 2014 Volume 4 Service Pack 2 Release v12.4.0.34 from the following link to resolve the above mentioned issue.

http://www.syncfusion.com/downloads/aspnet-service-packs

After upgrading to our latest version, please change the scripts and css files with the latest version in your project. The updated scripts and css files can be found in the following location.

CSS Location: C:\Program Files (x86)\Syncfusion\Essential Studio\12.4.0.34\JavaScript\assets\css\web

Script Location: C:\Program Files (x86)\Syncfusion\Essential Studio\ 12.4.0.34\JavaScript\assets\scripts\web

Query : to be able to set my locale in one place ( the web.config globalization tag for example) so i don't need to set the .locale in all the controls

We considered this requirement “Setting default localization in web.config file” as a feature and a support incident has been created under your account to track the status of this issue. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Please get back to us if you need any further assistance.

Regards

Ragavee U S


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

;