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

Static Data Not Showing

1 Answer 38 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 06 Apr 2016, 04:05 AM

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>

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 08 Apr 2016, 02:10 PM
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.
Tags
ListBox
Asked by
L
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or