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

Add/Edit/Delete button

3 Answers 415 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 16 May 2013, 10:40 AM
Hi,

I am using this command for add, edit and delete in Kendo Grid

columns.Command(command => { command.Edit(); command.Destroy();
.ToolBar(toolbar => toolbar.Create())

I knew I can change the button text by using
.Text("something")
.UpdateText("something")
.CancelText("something")

My question is how to remove the button text from them.

I have tried
.Text("")
.UpdateText("")
.CancelText("")

But it won't work.

Please help!

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 16 May 2013, 11:11 AM
Hello Dan,


The correct way to remove the text from the command buttons is to set it to a single space.
E.g.
command.Edit().Text(" "); // space

You could also add the following CSS in order to preserve the styling. (it's an example for the Edit command).
E.g.
.k-grid .k-button.k-grid-edit
{
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
}
  
.k-grid .k-button.k-grid-edit .k-icon
{
    margin: 0;
}

I hope this was the information that you were looking for.

 

Kind regards,
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
Dan
Top achievements
Rank 1
answered on 17 May 2013, 03:28 AM
Hi Dimiter,

Actually I did try set it as a single space previously, but the button comes out with icon and a single space behind for add button while edit and delete button are not re-sized as icon width.

I figured out I need to do something on css to change the width for them after set the command text as space.
Thanks.


0
Dimiter Madjarov
Telerik team
answered on 17 May 2013, 11:30 AM
Hi Dan,


I am glad, that the solution has worked in the current scenario. Please let me know if I could assist you further.

 

Kind regards,
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!
Tags
Grid
Asked by
Dan
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Dan
Top achievements
Rank 1
Share this question
or