clickable image item in radpanelbar

2 posts, 0 answers
  1. appdev
    appdev avatar
    223 posts
    Member since:
    Sep 2008

    Posted 02 Nov 2009 Link to this post

    i have this on the front end
    <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="150px" Height="800px" ExpandMode="FullExpandedItem"   
                            OnItemClick="RadPanelBar1_ItemClick" Skin="Vista">  
                            <Items> 
                                <telerik:RadPanelItem  Value="RadPanelBar_ThumbNail" Text="Pictures" Expanded="true">  
                                    <Items> 
                                        <telerik:RadPanelItem Value="ThumbNail_Child" /> 
                                    </Items>                              
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelBar> 
    and in the server i have
    Dim PanelItem As RadPanelItem = DirectCast(RadPanelBar1.Items(0), RadPanelItem)  
                For Each sFile As String In System.IO.Directory.GetFiles(Server.MapPath("images/thumbnail"))  
                    Dim sJustFile As String = New System.IO.FileInfo(sFile).Name  
                    Dim ChildItem As New RadPanelItem  
                    ChildItem.Text = " " 
                    ChildItem.ImageUrl = "images/thumbnail/" & sJustFile.ToString  
                    ChildItem.Value = Replace(sJustFile.ToString, "-thumb.jpg", "")  
                    PanelItem.Items.Add(ChildItem)  
                Next 
    this will make my image clickable but if i take out CHILDITEM.TEXT = " " then my items are not clickable anymore. is there any other way to do this? please help thank you very much.
  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 03 Nov 2009 Link to this post

    Hello Duy,

    In order to achieve your goal you should still set the Text property even though to an empty string.

    Best wishes,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top