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
620
CellBinding to IsEnabled property
posted

Hi,

We are evaluating 15.1.  The CellBinding feature is a feature that we would really like to use, but I am running into an interesting issue.  I have the following code.  In the UI, the disabled cells show up gray and the enabled cells show up white, as expected.  However, I'm still able to edit and change the value of the disabled cells.  Is this a known issue, or am I doing something wrong?

<igdp:CurrencyField Name="Salary">

     <igdp:CurrencyField.CellBindings>

          <igdp:CellBinding Property="IsEnabled" Target="Editor" Binding="{Binding Path=DataItem.CanEditSalary}"/>

     </igdp:CurrencyField.CellBindings>

</igdp:CurrencyField>

I'm pretty sure the binding is setup correctly, because as I noted, I do see the disabled cells being grayed out.

If I change the code as follows, all cells show up gray, as expected.  However, this time I am not able to edit the cells, which is the behavior I would expect to see.

<igdp:CurrencyField Name="Salary" IsEnabled="False" />

I can attach a sample project that shows this issue if need be.

Parents
No Data
Reply
  • 17475
    Offline posted

    Hello Tory,

    I have put together a sample project trying to reproduce the behavior with version 15.1 using your code snippet and it seems that on my side the cells are not editable when the CanEditSalary is false. Would you please have a look at the project and let me know if I am missing something in your scenario?
    Please also note that CellBinding equals setting a CellValuePresenter’s property locally. This means that the triggers in the default style where IsEnables property is used will not be applied.

    XamDataGridCellBinding.zip
Children