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
458
AllowEdit with Binding
posted

Hello,

I need to use Binding in the property AllowEdit. I set this way:

 

 <my:XamDataGrid IsSynchronizedWithCurrentItem="True"
                                Margin="0,0,0,0" Name="DataGridProductsOfExpense" AllowDrop="False" 
                                GroupByAreaLocation="AboveDataArea" DataSource="{Binding ProductsCollectionView,Mode=TwoWay}"
                                GroupByAreaMode="MultipleFieldLayoutsFull"  Background="Transparent" Foreground="White" >                                                   

                    <my:XamDataGrid.FieldLayouts>
                        <my:FieldLayout Description="Products">

                           <my:Field Width="Auto"  Name="Quantity" Label="Quantidade" >
                                <my:Field.Settings>
                                    <my:FieldSettings InvalidValueBehavior="RevertValue"  AllowEdit="{Binding DataItem.IsEditable}"/>
                                </my:Field.Settings>
                            </my:Field>


                        </my:FieldLayout>
                    </my:XamDataGrid.FieldLayouts>

                    <my:XamDataGrid.FieldSettings>
                        <my:FieldSettings  AllowRecordFiltering="True" AllowSummaries="True"
                                                       SummaryUIType="MultiSelect" FilterOperandUIType="Default"
                                                       FilterClearButtonVisibility="Visible"
                                                       DataValueChangedScope="Default"  />
                    </my:XamDataGrid.FieldSettings>
                    <my:XamDataGrid.FieldLayoutSettings>
                        <my:FieldLayoutSettings ExpansionIndicatorDisplayMode="Never" AllowFieldMoving="WithinLogicalRow" AllowAddNew="False" AllowDelete="False"
                                                            SelectionTypeRecord="Single" AutoGenerateFields="False" MaxSelectedRecords="1"
                                                            HeaderPrefixAreaDisplayMode="FieldChooserButton"
                                                            HeaderPlacement="OnTopOnly" HeaderPlacementInGroupBy="OnTopOnly">
                        </my:FieldLayoutSettings>
                    </my:XamDataGrid.FieldLayoutSettings>
                </my:XamDataGrid>

 

In the CodeBehind i set the variable "IsEditable" with true or false. But the the binding not works.

Someone can help me?

Thanks

Parents
No Data
Reply
  • 458
    posted

    Again???? Someone can help me??? Or does nobody know a solution for this problem?

Children