DataFormComboBoxField select multiple items

2 posts, 0 answers
  1. adao
    adao avatar
    2 posts
    Member since:
    Mar 2008

    Posted 14 Nov 2011 Link to this post

    We are moving all our projects to Telerik Silverlight controls and, in old code, one of our features was the ability to choose multiple items from a combobox using a checkbox .

    I've already found the equivalent code here but i cant figure out how to apply it to auto generated forms. For example, when i have a field like ta_country_id i replace current datafield with a code like this:

    if (campo.StartsWith("ta_") && campo.EndsWith("_id"))
        DataFormComboBoxField dataField = new DataFormComboBoxField();
        dataField.Label = campo;
        dataField.DisplayMemberPath = "FieldName";
        dataField.SelectedValuePath = "FieldID";
        dataField.DataMemberBinding = new Binding(campo);
        e.DataField = dataField;
        getComboboxData(campo, dataField);
    Now i need something similar but where i am able to select multiple items via checkbox for fields that allow multiple values (example: ta_options_ids). This field keeps a value in format id1, id2, id3, ..., idn

    Thank you in advance
  2. Maya
    Maya avatar
    4062 posts

    Posted 15 Nov 2011 Link to this post

    Hi Adao,

    You can try to create ContentTemplate for the combo box field in xaml and assign it in the code-behind. I am sending you a sample project illustrating this approach. Would you take a look at it and let me know whether it will correspond to your requirements ? 

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
Back to Top