I have a template listbox within a datagrid that is set up for single mode selection. When I select a row from this listbox and move to another control within the grid, the selection loses focus (the row gets unselected). I have a multiple mode selection template listbox which works fine. If I move to another control on the grid, those selections stay selected.
Here is my html code:
<code>
<asp:TemplateColumn HeaderText="Crew Chiefs">
<ItemTemplate>
<asp:listbox AutoPostBack="False" BackColor="#ffffff" id="lstCrewChief" runat="server" Rows="1" DataSource="<%# DsCrewChief1 %>" Enabled="True" SelectionMode="Single" DataTextField="UserName" DataValueField="UserID" />
</asp:listbox>
</ItemTemplate>
</asp:TemplateColumn>
</code>
Is there any other property I'm supposed to set or create an eventhnadler that will have the selected row in my single mode listbox stay selected when I move to another control on the grid???




Reply With Quote