I've created a gridview in which I have added a 'div' section and under that I've created a Listbox (lstEmailIds). Now I want to assign the datasource for the Listview in RowDataBound event. But I'm unable to access the Listbox. Suggest me how can I achieve this. Here is my code.
asp:GridView ID="gridview1" runat="server" CellPadding="4" ForeColor="#333333"
GridLines="None" Width="252px" onrowdatabound="gridview1_RowDataBound">
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<table><tr><td valign="middle" align="left">
</td></tr></table>
<asp:Button ID="btn1" Text="Show" runat="server" PostBackUrl="#" onmouseover="<%# GetPopupScript() %>" />
<div id="<%#Eval("issueid")%>DivDetails3" style="Z-INDEX:260; POSITION: absolute;HEIGHT:38px; display:none">
<table bgcolor="#cccccc" border="1" bordercolor="#ff9900" cellpadding="1" cellspacing="0"
style="border-collapse: collapse; width: 201px; height: 1px;">
<tr>
<td colspan="1" style="height: 115px">
<table bordercolor="#ffff00" cellpadding="1" cellspacing="0" style="width: 229px">
<tr>
<td align="left" colspan="2" style="width: 77%; height: 14px;">
SendMail
</td>
<td align="right" style="height: 14px; width: 23%;">
<a href="#" önclick="CloseDiv3('DivDetails3');" title="Click here to close.">
X</a>
</td>
</tr>
<tr colspan="2">
<td align="left" valign="middle">
<asp:ListBox ID="lstEmailIds" runat="server" SelectionMode="Multiple" Width="223px">
</asp:ListBox>
</td>
</tr>
<tr colspan="2">
<td>
<asp:TextBox runat="server" ID="txtNotifyComments" Height="47px" TextMode="MultiLine"
Width="222px"></asp:TextBox>
</td>
</tr>
<tr colspan="2">
<td>
<asp:Button ID="btnSendMail" runat="server" Text="Send Mail" CssClass="standardText"
AccessKey="M" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>

New Topic/Question
Reply




MultiQuote





|