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

Resize Grid command buttons

2 Answers 121 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.
Barry
Top achievements
Rank 1
Barry asked on 26 Apr 2011, 10:48 AM

Hi,

I have the edit and delete buttons

 

 

columns.Command(commands =>

 

{

 

commands.Edit().ButtonType(

 

 

 

GridButtonType

.ImageAndText);

 

 

commands.Delete().ButtonType(

 

 

 

GridButtonType

.ImageAndText);

 

 



How can I resize the default button size? Please see attachment for more details

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 26 Apr 2011, 11:12 AM
Hello Barry,

Currently the width of the Grid edit buttons is controlled by the following CSS code:

.t-grid tbody .t-button
{
    min-width: 64px; /*main setting*/
}
 
.t-grid tbody button.t-button, #ie8#skips
{
    min-width: 78px; /*+14 for buttons, except IE8*/
}
 
*+html .t-grid tbody a.t-button
{
    min-width: 62px; /*-2 for links for IE7*/
}

There complexity of the code is due to cross-browser issues, which require use to use several CSS declarations in order to achieve the same size in different browsers.

What you can do is use the same logic and code, but different numbers. Also, it is better to use higher specificity, e.g.:

div.t-grid tbody .t-button
{
    min-width: 164px; /*main setting*/
}
 
div.t-grid tbody button.t-button, #ie8#skips
{
    min-width: 178px; /*+14 for buttons, except IE8*/
}
 
*+html div.t-grid tbody a.t-button
{
    min-width: 162px; /*-2 for links for IE7*/
}


Of course, you can set min-width to zero and use width styles, especially if you want to make the buttons smaller.


Greetings,
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
Barry
Top achievements
Rank 1
answered on 29 Apr 2011, 04:32 AM
Thanks Dimo! The css worked like a charm :)
Tags
Grid
Asked by
Barry
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Barry
Top achievements
Rank 1
Share this question
or