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

[Solved] Change the text of buttons of the GridView

4 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Julien
Top achievements
Rank 1
Julien asked on 21 Apr 2011, 10:30 AM
Hi,

I've two questions:

-For button that we have when we register command on our grid, can we change the title?
-I need to change the text mostly because it's in the wrong language, are you component localized and I only have to indicate in which language I want it displayed?

Thank you very much!

4 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 21 Apr 2011, 11:46 AM
Hello Julien,

Yes, you can change the text of buttons by means of localization. Please refer to the following resources:

documentation
http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-localization.html

demo
http://demos.telerik.com/aspnet-mvc/grid/localization

Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Julien
Top achievements
Rank 1
answered on 21 Apr 2011, 12:25 PM
Okay, but how do I set the UICulture:
<%@ Page Language="C#" UICulture="de-DE" Inherits="System.Web.Mvc.ViewPage" %>

with Razor?

Thank you
0
Dimo
Telerik team
answered on 21 Apr 2011, 12:53 PM
Hi Julien,

You can see how we do it in the demo site. We use a custom attribute [CultureAwareAction] for the ActionResult method in the controller of the Localization example. The custom attribute is defined in Telerik.Web.Examples / Filters / CultureAwareActionAttribute.cs - the culture is being set there.

You can also take a look at the following page, which comes up when you search in Google:

http://stackoverflow.com/questions/1560796/set-culture-in-an-asp-net-mvc-app

Regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Dimo
Telerik team
answered on 21 Apr 2011, 01:24 PM
P.S.

Actually, if you have to support only one culture, you can set it in _ViewStart.cshtml:

@{
    System.Threading.Thread.CurrentThread.CurrentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr-CH");
}


Best wishes,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Julien
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Julien
Top achievements
Rank 1
Share this question
or