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
96
How to bind an UnboundField which is checked listbox
posted

Hi

I have a checked listbox control and which has a multiselection feature.

I'm unable to bind the control to a property inside the grid. Can you suggest the way to bind an unbound field to a property. I guess the List Itemsource needs to be binded and the Content of the checkbox need to be binded. I have exposed name and the Ischecked fields in the Data

Can you provide a sample on the same.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<Style x:Key="ValueCellStyle" TargetType="{x:Type igDP:CellValuePresenter

}">

 

 

 

<Setter Property

="Template">

 

 

 

<Setter.Value

>

 

 

 

<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter

}">

 

 

 

<Expander Height="Auto" Width="Auto" Header="{Binding SelectedItems

}">

 

 

 

<Grid

>

 

 

 

<ListBox ItemsSource="{Binding ValueList}" Height="Auto" Width

="Auto"

 

 

HorizontalAlignment="Center"

 

 

VerticalAlignment

="Center">

 

 

 

<ListBox.ItemTemplate

>

 

 

 

<DataTemplate

>

 

 

 

<CheckBox IsChecked="True" Content="{Binding Name

}"/>

 

 

 

</DataTemplate

>

 

 

 

</ListBox.ItemTemplate

>

 

 

 

</ListBox

>

 

 

 

</Grid

>

 

 

 

</Expander

>

 

 

 

</ControlTemplate

>

 

 

 

</Setter.Value

>

 

 

 

</Setter

>

 

 

 

</Style

>

 

 

<igDP:UnboundField Name="ValueList" >

 

 

<igDP:UnboundField.Settings>

 

 

<igDP:FieldSettings

 

CellValuePresenterStyle="{StaticResource ValueCellStyle}"/>

 

 

</igDP:UnboundField.Settings>

 

 

</igDP:UnboundField>

 This style is applied on the unboundfield but it doesn't show anything.

Binding fails for some reason on grid. Please provide some help on the same

  • 9694
    posted

    Hello,

    I apologize that this post was not answered sooner. We are making the effort to ensure all posts are addressed by an Infragistics expert.

    There is an example on how to use a CheckBox in an Unbound Field in the WPF NetAdvantage Feature Browser sample. Look in the XamDataGrid Control Composition section.

    Thank you,