Static Data Not Showing

2 posts, 1 answers
  1. L
    L avatar
    295 posts
    Member since:
    Apr 2008

    Posted 05 Apr Link to this post

    hi

     

    The radlistbox is not showing or displaying anything on screen. Why is that so? Thanks

     

    here is my code:

     

     <telerik:RadListBox ID="lbList"  runat="server" BorderWidth="0px" BorderStyle="None" Width="100%" style="top: 0px; left: 0px"  BorderColor="White">            <ItemTemplate>
                 <table>
                     <tr>
                        <td ><asp:Image ID="Image1" runat="server" ImageUrl="~/crm/profileimage/freelance.png" /></td>
                        <td>John Wayne</td>
                    </tr>
                 </table>
            </ItemTemplate>
    </telerik:RadListBox>

  2. Answer
    Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 08 Apr Link to this post

    Hi,

    Could you confirm that you have called DataBind() in order to populate the control?
    public void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            lbList.DataBind();
        }
    }

    I would also recommend you go through the demo and article below that elaborate on ItemTemplates of the ListBox control:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/listbox/templates/overview
    http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/templates/defaultcs.aspx

    Regards,
    Pavlina
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top