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
4341
DataTrigger not firing when using IMultiValueConverter
posted

Hello Support,


We are trying to implement IMultiValueConverter in xamDataGrid, however the trigger is not getting executed in some of the cases.
We observed that if we add a record to the xamDataGrid the converter returns the value as "DependencyProperty.UnsetValue", however if add a row to the source binded to xamDataGrid the converter returns proper value and trigger is fired.
We have attached herewith the sample code for your reference. In our sample application, we have added trigger on Column2, Column3 & Column4. If the value in Column1 is 1, then Column2,Column3 & Column4 cells should get disabled. And if the value in Column1 is 0, then only Column4 cell should get disabled. When you run the application you'll observe that in last row & Column4 the cell is not disabled, however as per the condition it should have been disabled.
Can you please review the sample application and let us know if we are missing something here.

CellDisableStyle.rar
  • 138253
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post I have been looking into it and the sample you have provided and I modified it, so now it works as you want. Basically I changed the first Binding in the MultiBinding and also added one, so I know when the CellValuePresenter is in the AddNewRecord. Please let me know if this helps you or you need further assistance on this matter.

     

    Looking forward for your reply.

    CellDisableStyle.zip