How to add itemtemplate in silverlight grid like asp.net


hi,
  want add 1 gridview control follows in silverlight application. can 1 me how achieve this?
<asp:gridview id="gdview" runat="server" autogeneratecolumns="false" alternatingrowstyle-cssclass="grdalterrowcolor" 
headerstyle-cssclass="grdheading" headerstyle-horizontalalign="center"
rowstyle-cssclass="grdlable" rowstyle-horizontalalign="left" cellpadding="4" cellspacing="0">
<columns>
<asp:templatefield headertext="s.no">
<itemtemplate>
<%#container.dataitemindex+1 %>
</itemtemplate>
</asp:templatefield>

<asp:templatefield headertext="questions">
<itemtemplate>&nbsp;&nbsp;&nbsp;
<asp:textbox id="txtquestion" runat="server" textmode="multiline" width="600px" cssclass="txtbox"></asp:textbox>
<div>
<asp:panel id="paneloptional" runat="server">
<table width="100%" border="0">
<tr>
<td class="txtbox" style="width:50%">a. <asp:textbox id="txtopt1" runat="server" width="90%" ></asp:textbox></td>
<td class="txtbox" style="width:50%">b. <asp:textbox id="txtopt2" runat="server" width="90%" ></asp:textbox></td>
</tr>
<tr>
<td class="txtbox" style="width:50%">c. <asp:textbox id="txtopt3" runat="server" width="90%" ></asp:textbox></td>
<td class="txtbox" style="width:50%">d. <asp:textbox id="txtopt4" runat="server" width="90%" ></asp:textbox></td>
</tr>
</table>
</asp:panel>
</div>
</itemtemplate>
</asp:templatefield>

<asp:templatefield headertext="type">
<itemtemplate>

<asp:dropdownlist id="ddtype" runat="server" width="80px" cssclass="ddownn">
<asp:listitem value="1">optional</asp:listitem>
<asp:listitem value="2">checkbox</asp:listitem>
</asp:dropdownlist><br /><br />

<asp:dropdownlist id="ddstatus" runat="server" width="80px" cssclass="ddownn">
<asp:listitem value="1">active</asp:listitem>
<asp:listitem value="2">deactive</asp:listitem>
</asp:dropdownlist>

</itemtemplate>
<headerstyle verticalalign="top"/>
</asp:templatefield>

<asp:templatefield headertext="answer">
<itemtemplate>
<%--<asp:dropdownlist id="ddanswer" runat="server" width="80px" cssclass="ddownn">
<asp:listitem value="1">a</asp:listitem>
<asp:listitem value="2">b</asp:listitem>
<asp:listitem value="3">c</asp:listitem>
<asp:listitem value="4">d</asp:listitem>
</asp:dropdownlist>--%>

<asp:listbox id="listanswer" runat="server" width="50px" cssclass="ddownn" selectionmode="multiple">
<asp:listitem value="1">a</asp:listitem>
<asp:listitem value="2">b</asp:listitem>
<asp:listitem value="3">c</asp:listitem>
<asp:listitem value="4">d</asp:listitem>
</asp:listbox>
</itemtemplate>
<headerstyle verticalalign="top" />
</asp:templatefield>

</columns>
</asp:gridview>
  
thanks in advance,
rajesh.m



Silverlight  >  Silverlight Controls and Silverlight Toolkit



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........