Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
WebDropDown Always show Checkboxes
posted

I added a WebDropDown to a Content page and set it to allow multi selection and with MultiSelectionType Keyboard. It worked properly. Then, I changed the MultiSelectionType to Checkbox and it worked properly. Then, I changed the MultiSelectionType back to keyboard and the check boxes still show. I have removed the dropdown box from the form and placed a new one and the checkboxes still show. I have reset IIS and cleared the cache on the server and the checkboxes still show.

How can I make the checkboxes in the WebDropDown control go away?

Thanks,

Fernando

Parents
No Data
Reply
  • 355
    posted

    You can try to customize the DropDown control, then make the Checkboxes disappear. Here are some codes for example:

    private void dropDownList_VisualListItemFormatting(object sender, VisualItemFormattingEventArgs args)
    {
    if (args.VisualItem.Chosen)
    {
    args.VisualItem.NumberOfColors = 1;
    args.VisualItem.BackColor = Color.Green;
    args.VisualItem.BorderColor = Color.Purple;
    }
    else
    {
    args.VisualItem.ResetValue(LightVisualElement.NumberOfColorsProperty, Kettic.WinControls.ValueResetFlags.Local);
    args.VisualItem.ResetValue(LightVisualElement.BackColorProperty, Kettic.WinControls.ValueResetFlags.Local);
    args.VisualItem.ResetValue(LightVisualElement.BorderColorProperty, Kettic.WinControls.ValueResetFlags.Local);
    }
    }

Children
No Data