Thursday, January 26, 2017

WPF Devexpress Datagrid checkbox binding


We can easily bind the checkbox on devexpress datagrid


 <dxgcore:GridColumn Width="20"  
                     AllowEditing="True"  
                     Binding="{Binding Path=IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  
                     Header="R"  
                     Visible="{Binding CheckboxSelection}"  
                     VisibleIndex="6">  
             <dxgcore:GridColumn.CellTemplate>  
               <DataTemplate>  
                 <dxe:CheckEdit HorizontalAlignment="Center"  
                         VerticalAlignment="Center"  
                         Command="{Binding Path=View.DataContext.IsCheckedCommand}"  
                         CommandParameter="{Binding RowData.Row}"  
                         IsChecked="{Binding RowData.Row.IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  
                         IsEnabled="{Binding Path=View.DataContext.IsCheckBoxEnabled, UpdateSourceTrigger=PropertyChanged}" />  
               </DataTemplate>  
             </dxgcore:GridColumn.CellTemplate>  
           </dxgcore:GridColumn>  

Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file

In my Xamarin form application their was dependency Restclient on Microsoft.Bcl.Build Microsoft.Bcl. i just remove all using nuget and ...