Try to bind data at image in radlistview

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    35 posts
    Member since:
    Jan 2011

    Posted 30 Aug 2012 Link to this post

    Hey Community,


    i hope you can help me.


    I use the RadListView Control. In that I have the image control.

    I try to bind a path from my Database at the image in the RadListView Control.


    But it doesn’t work…

    I found this code:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
           For Each item As RadListViewDataItem In rlvGalerie.Items
                Dim fcimgGalerie As Image = DirectCast(item.FindControl("imgGalerie"), Image)
                Dim Verzeichnis As String = Hilfsfunktion.GetCRTUploadVerzeichnisZuordnung(13, "Dateisystem")
                fcimgGalerie.ImageUrl = Verzeichnis & "\" & SlidewayGalerie.GETDateiName(13)
    End Sub

    Thats the control definition:

            <telerik:RadListView ID="rlvGalerie" runat="server" DataSourceID="sdsGalerie" Skin="Windows7">
                    <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
                    <div style="float: left; margin: 5px; padding: 2px; background: #eeeeee;" class="myClass"
                        onmouseover="containerMouseover(this)" onmouseout="containerMouseout(this)">
                        <asp:ImageButton ID="imgGalerie" ImageUrl="" Width='<%# ImageWidth %>'
                            Height='<%# ImageHeight %>' runat="server" OnClientClick="openRWGalerie(window.location.pathname;)"
                            Style="margin: 0; padding: 0;" />

    I hope you can help my

    Greetings Daniel
    Sorry for my Englich

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 31 Aug 2012 Link to this post


    Try accessing the ImageButton as shown below.
    Protected Sub Page_Load(sender As Object, e As EventArgs)
        For Each item As RadListViewDataItem In RadListView1.Items
    Dim fcimgGalerie As ImageButton = DirectCast(item.FindControl("imgGalerie"), ImageButton)
    End Sub

  3. DevCraft R3 2016 release webinar banner
Back to Top