<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
<script type="text/javascript">
function onClientSelectedIndexChanged(sender, eventArgs)
{
    var message = "ID: " + eventArgs.get_item().get_attributes().getAttribute("ProductID");
    message += "\nProduct Name: " + eventArgs.get_item().get_attributes().getAttribute("Name");
    message += "\nPrice: " + eventArgs.get_item().get_attributes().getAttribute("Price");
    alert(message);
}
</script>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
<telerik:RadComboBox runat="server" 
    ID="RadComboBox1" 
    Width="455px" 
    HighlightTemplatedItems="true"
    EnableLoadOnDemand="true"
    OnClientSelectedIndexChanged="onClientSelectedIndexChanged"
    OnItemDataBound="RadComboBox1_ItemDataBound" 
    OnItemsRequested="RadComboBox1_ItemsRequested">
<ItemTemplate>
               <table style="width:415px">
                  <tr>
                     <td style="width:125px;">
                        <%# DataBinder.Eval(Container.DataItem, "ID") %>
                     </td>
                     <td style="width:125px;">
                        <%# DataBinder.Eval(Container.DataItem, "ProductName") %>
                     </td>
                     <td style="width:125px;">
                        <%# DataBinder.Eval(Container.DataItem, "Price") %>
                     </td>
                  </tr>
               </table>            
</ItemTemplate>
<HeaderTemplate>
               <table style="width:415px">
                  <tr>
                     <td style="width:125px;">
                        ID
                     </td>
                     <td style="width:125px;">
                        Product Name
                     </td>
                     <td style="width:125px;">
                        Price
                     </td>
                  </tr>
               </table>
            
</HeaderTemplate>

</telerik:RadComboBox>
        </div>
    </form>
</body>
</html>
