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

Use Resource pictures - how ?

3 Answers 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mSchmidt
Top achievements
Rank 1
mSchmidt asked on 03 Nov 2008, 04:23 PM

Hi

Iam creating my own Command Item Template because i need the add new record to open in a RadWindow instead of reloading the entire grid which is needed when doing inline editing.

However i would very much like to use the same picture you use when creating the standard Add and Delete buttons.

How do i Access these pictures ?

 

 

<CommandItemTemplate><asp:LinkButton ID="LinkButton2" runat="server" OnClientClick="addNewClick(); return false;"><img style="border:0px" alt="" src="../../DataEditing/Img/AddRecord.gif" />Add New</asp:LinkButton></CommandItemTemplate


 

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 03 Nov 2008, 07:00 PM
Hello Morten,

Please use an asp:Button with a CssClass="rgAdd". It will take the respective skin's background image for the "Add Record" button.


All the best,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mSchmidt
Top achievements
Rank 1
answered on 03 Nov 2008, 07:06 PM
Okay, but isnt there any way for me to directly access the WebResource.axd or shouldn't I ?
0
Dimo
Telerik team
answered on 03 Nov 2008, 08:55 PM
Hello Morten,

Actually the rgAdd CSS class will use a sprite image as a background. This sprite image is not the type of WebResource that you need.

However, you can indeed use an embedded image in the way that you prefer. Here is how:

<img src='<%= Page.ClientScript.GetWebResourceUrl(typeof(Telerik.Web.UI.RadGrid), "Telerik.Web.UI.Skins.SkinName.Grid.AddRecord.gif") %>' alt="Add New" />


Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
mSchmidt
Top achievements
Rank 1
Answers by
Dimo
Telerik team
mSchmidt
Top achievements
Rank 1
Share this question
or