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

How do I change Heirarchy button to image?

5 Answers 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kia
Top achievements
Rank 1
Kia asked on 01 Apr 2008, 04:25 AM
Hi, I have a grid with a child heirarchy grid. I'm also using custom skins.

Can anyone tell me how to change the default expand and collapse buttons to the image specified in the skin?

5 Answers, 1 is accepted

Sort by
0
Kia
Top achievements
Rank 1
answered on 02 Apr 2008, 01:01 AM
I can't seem to find the Expand/Collapse type on the properties window, but managed to track down and set ButtonType="ImageButton"
and I do have Image paths set for the skin images. Still no difference.
0
Yavor
Telerik team
answered on 03 Apr 2008, 10:31 AM
Hi Kia,

Attached to this message, is a sample application, which handles the required functionality.
I hope it helps.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kia
Top achievements
Rank 1
answered on 10 Apr 2008, 09:42 AM
Thanks Yavor, but I still have a problem.

It all works fine on one machine and displayes the + and - images, but continues to show a blank button on other machines. I have the following code for both MasterTableView and DetailsTableView:

            <ExpandCollapseColumn CollapseImageUrl="RadControls/Skins/GluckVision/Grid\SingleMinus.gif" 
                ExpandImageUrl="RadControls/Skins/GluckVision/Grid\SinglePlus.gif" FilterImageUrl="RadControls/Skins/GluckVision/Grid\Filter.gif" 
                Resizable="False" SortAscImageUrl="RadControls/Skins/GluckVision/Grid\SortAsc.gif" 
                SortDescImageUrl="RadControls/Skins/GluckVision/Grid\SortDesc.gif" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"  ButtonType="ImageButton" > 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
 

One machine works, the ther does not. The one it works on originally had Prometheus 2007 installed while the machine that does not work had only 2008 installed. Though now the DLLs in the bin directory have all come from the 2008 version. Theoretically there should be no reference to the old version on this site.

Thanks,
Kia

 
0
Yavor
Telerik team
answered on 14 Apr 2008, 12:36 PM
Hello Kia,

Are you accessing a shared application on different machines, or running it on separate computers? Based on the supplied information, I suspect that in some scenarios are not resolved properly. You can also right-click on the image, and see where the application is trying to load it from - the Standard and Prometheus versions differently reference the images, and this may be part of the issue. You can make sure that the same .dlls are used in all cases, and also check the urls of the images, to ensure that they are properly resolved.

Kind regards,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kia
Top achievements
Rank 1
answered on 29 Apr 2008, 01:56 PM
For anyone who is sufferring the same issue, please refer to post http://www.telerik.com/community/forums/allthreads/b312H-ceh.aspx response 29-Apr-08.

Looks like the only way to use image buttons on grids with custom skinning is to set it in init event code.

    protected override void OnInit(EventArgs e)  
    {  
        base.OnInit(e);  
        RadGrid1.MasterTableView.ExpandCollapseColumn.ButtonType = Telerik.Web.UI.GridExpandColumnType.ImageButton;  
    }  
 

I've noticed this only in this new version.

Kia
Tags
Grid
Asked by
Kia
Top achievements
Rank 1
Answers by
Kia
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or