You must Sign In to post a response.
  • Category: WPF

    Checkbox checked issue in wpf

    hi, all,

    I am working on wpf with entity framework by using stored procedures,
    for binding i am using Results genarated model,
    my entity frame work dynamically giving one model,
    for biding DataGrid we used above model with ObservableCollection,
    we are binding checkbox for saving multiple records,
    after selecting checkbox in view it is dispalying all the checkbox are ckecked false,
    my code is

    <DataGrid AlternatingRowBackground="#F5F5DC"
    HorizontalAlignment="Stretch" MinHeight="400" Name="dgRequisitions" CanUserAddRows="False" VerticalAlignment="Top"
    ItemsSource="{Binding RequisitionsList, Mode=TwoWay,IsAsync=True}" Grid.Row="3" Grid.ColumnSpan="3" IsReadOnly="True" Style="{DynamicResource DataGridStyle1}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
    <DataGridTemplateColumn.CellTemplate >
    <DataTemplate >
    <CheckBox Width="40" IsChecked="{Binding Path= IsAuthorized,Mode=TwoWay }"></CheckBox>

    in vm
    foreach (var item in RequisitionsList)
    if (Convert.ToBoolean(item.IsAuthorized))

    after slected checkbox also every record is displaying isauthorized false
  • #757808
    Hello Ramana,

    Refer the below links:

    Best example i have ever seen:

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • Sign In to post your comments