locked
How to implement Listview type mechanism in silverlight ? RRS feed

  • Question

  • Hi friends,

    In my previous ASP.NET project, I've used "Listview" control to show the winners as you can see in the screen shot below


    And I'd put the listview into the marquee to scroll it automatically. The data which is appearing is taken from the SQL Server database. Can anybody tell me how can I do it, the same thing in silverlight. The Code I had used in ASP.NET is

    <asp:ListView ID="rcntwinslst" runat="server" DataSourceID="sqldtsrcrcntwins">
                            <LayoutTemplate>
                                <div id="itemPlaceholder" runat="server">
                                </div>
                            </LayoutTemplate>
                            <ItemTemplate>
                                <table style="width:80%">
                                    <tr>
                                        <td colspan="2" align="center">
                                            <asp:Label ID="lblpdtname" CssClass="marq_label" runat="server" Text='<%#Eval("PdtName") %>'></asp:Label>   
                                        </td>
                                    </tr>
                                    <tr>
                                        <td rowspan="2" style="width:50%">
                                            <asp:Image ID="imgpdt" runat="server" ImageUrl='<%#Eval("PdtImgUrl") %>' Width="50px" Height="50px" />
                                        </td>
                                        <td style="width:50%">
                                            <asp:Label ID="lbluname" CssClass="Uname" runat="server" Text='<%#Eval("UName") %>'></asp:Label> 
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:50%">
                                            <strong class="marq_label">Saved : </strong><br />
                                            <asp:Image ID="imgrs" ImageUrl="~/images/rs.png" Height="20px" Width="20px" runat="server" />
                                            <asp:Label ID="lblsavprice" CssClass="price" runat="server" Text='<%#Eval("SavingPrice") %>'></asp:Label>
                                        </td>
                                    </tr>
                                </table>                         
                                <hr class="per70" />
                            </ItemTemplate> 
                            </asp:ListView>
    Saturday, March 24, 2012 6:50 PM

Answers