Hi all:
I currently have the very basics set up with using the ComboBox that also allows users to select multiple items using a checkbox. Code below:
As you can see, by default ALL of the checkboxes are checked. Not what I want/need. For the life of me I can't seem to figure out how to bind my data. Below is the sqldatasource I'm using for this list, which pulls ALL options, which is what I want, but when a user edits information, I want the items that should be selected... selected.
The query that pulls the "selected" contacts should look like this:
I've been reverse engineering all of the demos here on the site, but I can't seem to get this. Any further help would be greatly appreciated.
Thanks,
TL
I currently have the very basics set up with using the ComboBox that also allows users to select multiple items using a checkbox. Code below:
<telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="myDS" DataTextField="fullname" DataValueField="id" oncopy="return false;" onpaste="return false;" oncut="return false;" onkeypress="return tabOnly(event)" onmousewheel="return false" OnClientDropDownOpening="OnClientDropDownOpening" OnClientDropDownClosing="OnClientDropDownClosing" OnClientSelectedIndexChanging="OnClientSelectedIndexChanging" OnClientBlur="OnClientBlur" Width="200px" AllowCustomText="True" ChangeTextOnKeyBoardNavigation="False"> <ItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval("fullname") %>' Checked="true"/> </ItemTemplate></telerik:RadComboBox><asp:SqlDataSource ID="myDS" runat="server" ConnectionString="<%$ ConnectionStrings:myconnection %>" SelectCommand="SELECT DISTINCT contacts.id, contacts.fullname FROM contacts ORDER BY fullname"></asp:SqlDataSource>SELECT id, areaID, contactID FROM area_contact_map WHERE areaID = 6 AND (blnRemoved IS NULL OR blnRemoved = 0)Thanks,
TL