Posted on: 5/28/2014 1:12:21 PM | Views : 330

I have a listbox, that shows all three columns, however, I want to separate them by group? with a header

 
<asp:ListBox ID="lstsel" runat="server" DataSourceID="SQLlistsel" DataValueField="LOCATIONID" DataTextField="TreeColumns" Width="300" Height="200"></asp:ListBox><asp:SqlDataSource ID="SQLlistsel" runat="server" ConnectionString="<%$ ConnectionStrings:LI %>" ProviderName="<%$ ConnectionStrings:LI.ProviderName %>" SelectCommand="SELECT [LOCATIONID], [LOCNM], [STATUS], CAST(LOCATIONID as VarChar) + '-' + [LOCNM] + '-' + [STATUS] as TreeColumns FROM [LOCATIONS]"> </asp:SqlDataSource>

Go to the complete details ...