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

[Solved] commands.Insert() Questions

4 Answers 174 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.
Brendan Vogt
Top achievements
Rank 1
Brendan Vogt asked on 21 Sep 2010, 01:02 PM
Hi,

I added a toolbar button like this:

.ToolBar(commands => commands.Insert())


The default text for this button is "Add new record".  How do I change this text to something else like "Add New Application"?

When I click on this button then I want it to go to my add new application view.  Is this possible?

Thanks
Brendan

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 21 Sep 2010, 03:19 PM
Hi Brendan,

 Use a custom command instead. It allows you to put whatever text you want and navigate to arbitrary action or url. You can check the custom command demo for additional info.

Greetings,
Atanas Korchev
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
Victor
Top achievements
Rank 1
answered on 15 Dec 2010, 01:35 PM
Hi!

We came across this problem as well. Is ther any way to either make the custom command open the default popup insert when in ajax mode and default to server-side insert (with popup) or is this maybe something that can be added in the future ( => commands.Insert("Insert Button Label"))?

Thanks
Victor
0
Atanas Korchev
Telerik team
answered on 15 Dec 2010, 02:01 PM
Hello Victor,

 You can modify the grid localization if you just want to change the text of the Insert command.

All the best,
Atanas Korchev
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
Victor
Top achievements
Rank 1
answered on 15 Dec 2010, 03:04 PM
Ok, thank you for that. Since we want different captions on different insert buttons we will change the caption with jquery just after rendering the grid. Still, it would be nice to have the caption supported in the same way that custom actions do.

/Victor
Tags
Grid
Asked by
Brendan Vogt
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Victor
Top achievements
Rank 1
Share this question
or