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

[Solved] Image Button Names (from the sprite)

1 Answer 149 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.
Thomas
Top achievements
Rank 1
Thomas asked on 15 Jun 2012, 08:50 PM

I noticed that the GRID would generate the following html to display an edit button (Ajax Editing):
<a href="#" class="t-button t-grid-edit t-button-icon">
                <span class="t-icon t-edit"></span>
</a>

I didn't want to use the built in functionality, so I created a column:

columns.Template(
                @<text>
                <a href="#" onclick="ClientEditFunction(@item.ItemId); return false;"
                                class="t-button t-button-icon">
                                <span class="t-icon t-edit"></span>
                </a>     
                </text>);

This would generate the same edit button that would, when clicked, execute the client script: ClientEditFunction(itemId). (note: "t-grid-edit" is removed from link's class)

Then I found that changing the span's class from t-edit to t-add would display an add (plus) button.

t-edit corresponds to the edit button
t-delete is the delete button
t-add is the add (plus) button

I know there are more images in the sprite.  I see a magnifying glass (view) icon, a check mark icon, a trash can...
Is there a list for the other images in the sprite?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 18 Jun 2012, 07:56 AM
Hello Thomas,

I am afraid such a list is not available currently, but you can see the names of the sprite-related CSS classes in the telerik.common.css file. Open the non-minified version and go to lines:

210

2153

2937

The sprite-related CSS classes are distinguished by the fact that they only apply a background-position style.

Kind regards,
Dimo
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Grid
Asked by
Thomas
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or