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

How to change buttons text of editable grid

4 Answers 1420 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shabtai
Top achievements
Rank 1
Shabtai asked on 08 Apr 2013, 03:18 PM
Hello,
I have server-side kendo grid
01.<div  class="k-rtl">
02.@(Html.Kendo().Grid<BO.UserPemissions>()
03.        .Name("UserPemissionsGrid").Events(e => e.DataBound("UserPemissionsRowDataBound"))
04.        .Columns(columns =>
05.        {
06.            columns.Bound(o => o.UserId).Title("ת.ז.");
07.            columns.Bound(o => o.PermittedProgramGroup).Title("קבוצות הרשאה");
08.            columns.Bound(o => o.PermittedProgramId).Title("תוכניות מורשות");
09.            columns.Command(command => command.Destroy()).Width(150);
10.        })
11.        .Pageable(pager => pager.PageSizes(true))
12.            .ToolBar(toolBar => { toolBar.Create(); toolBar.Save(); })
13.        .Sortable()
14.            .Scrollable()
15.            .Editable(editable => editable.Mode(GridEditMode.InCell))
16.                    .DataSource(dataSource => dataSource.Ajax().Model(model => model.Id("UserId")).Read(read => read.Action("UserPemissionsRowDataRead", "Home"))
17.                                .Update(update => update.Action("UserPemissionsRowDataUpdate", "Home"))
18.                                    .Create(update => update.Action("UserPemissionsRowDataCreate", "Home"))
19.                                            .Destroy(update => update.Action("UserPemissionsRowDataDestroy", "Home"))
20.                )
21.    )
22.</div>
I need to put my text in the standard control buttons inside the grid (see the attached picture)

Any possible help would be appreciated a.s.a.p.

Thanks

Shabtai

4 Answers, 1 is accepted

Sort by
1
Accepted
Dimiter Madjarov
Telerik team
answered on 08 Apr 2013, 03:57 PM
Hi Shabtai,


You could change the default text of the buttons using the Text() methods of the Grid Command builder.
E.g.
.ToolBar(toolbar => {
    toolbar.Create().Text("Custom Create");
    toolbar.Save().SaveText("Custom save").CancelText("Custom cancel");       
})

columns.Command(command =>
{
    command.Edit().Text("Custom Edit").UpdateText("Custom Update").CancelText("Custom Canel");
    command.Destroy().Text("Custom Destroy");
})

 

Greetings,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Shabtai
Top achievements
Rank 1
answered on 08 Apr 2013, 08:51 PM
Thank you so much!

I'd be grateful if you could also help me to make the same with the footer of the grid... (items and so...)
0
Accepted
Dimiter Madjarov
Telerik team
answered on 09 Apr 2013, 12:05 PM
Hi Shabtai,


If you are referring to the pager of the grid, you could achieve this through the pageable.messages configuration.

E.g.
.Pageable(p =>
      p.Numeric(true)
       .PageSizes(true)
       .Messages(m => m.ItemsPerPage("Custom Items per page")
             .Display("{0}-{1} from {2} elements")
             .First("custom first")
             .Last("custom last")
             .Previous("custom previous")
             .Next("custom next")))

 

All the best,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Shabtai
Top achievements
Rank 1
answered on 10 Apr 2013, 02:07 PM
Thank you very much!
Tags
Grid
Asked by
Shabtai
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Shabtai
Top achievements
Rank 1
Share this question
or