Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: CheckComboBox: Setting "Delimiter" to anything other than a comma

$
0
0
I am using the CheckComboBox inside a ListView/GridView but I seem unable to bind the selected items.

My [row] model (abbreviated) looks something like this...
class Model {

    private String surcharges = "PW";

    public String Surcharges {
        get { return this.surcharges; }
        set { this.surcharges = value; }
    }

    public List<Option> SurchargeOptions { get; set; }

}

class Option {

    public String Code { get; set; }
    public String Description { get; set; }

}
And the corresponding XAML looks like this...
<GridViewColumn Header="Surcharges">
    <GridViewColumn.CellTemplate>
        <DataTemplate>
            <et:CheckComboBox Delimiter=" " DisplayMemberPath="Code" ItemsSource="{Binding Path=SurchargeOptions}" MinWidth="150" SelectedValue="{Binding Path=Surcharges}" ValueMemberPath="Code" />
        </DataTemplate>
    </GridViewColumn.CellTemplate>
</GridViewColumn>
The SurchargeOptions property is set to a list of Option types prior to display, the list contains about 10 items including the "PW" option. The field on screen however does not display any content when not dropped down (I am expecting it to show "PW") and when dropped down the options are all present but none (including the "PW" are selected).

I am expecting the resulting Surcharges property to be set to a string containing each "Code" separated by a space.

I am using community edition v2.1 (downloaded from nuget); I am aware that there is an issue here and a corresponding work item here, but I was of the impression that these fixes would be in v2.1 and this now leads me to wonder if indeed I am using the control incorrectly.

Any help will be appreciated.

Thanks.

Viewing all articles
Browse latest Browse all 4964


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>