Hi,
We are using xamdatagrid to display our data in a wpf application.
The following code snippet depicts our code.
<vm:CustomInfragisticGrid.Resources> <Style x:Key="EditorStyle" TargetType="{x:Type igEditors:XamTextEditor}"> <Setter Property="ValueConstraint"> <Setter.Value> <igEditors:ValueConstraint MaxLength="60" /> </Setter.Value> </Setter> <Setter Property="IsAlwaysInEditMode" Value="True" /> </Style> <Style TargetType="{x:Type igEditors:XamTextEditor}"> <Style.Triggers> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Path=Value}" Value="004" /> <Condition Binding="{Binding Path=Description}" Value="testValue" /> </MultiDataTrigger.Conditions> <Setter Property="Background" Value="Cyan" /> </MultiDataTrigger> </Style.Triggers> </Style> </vm:CustomInfragisticGrid.Resources>
Could you please suggest the possible reasons for same??
Hello ashutosh,
Thank you for your post!
The reason that your MultiDataTrigger is not working in this case is because there is an issue with the binding of your Condition objects. Currently, that is binding to the data context of the XamTextEditor, which is the DataRecord in which it sits. While a Description property does exist on the DataRecord, there is no Value property and I get the impression that you are likely trying to bind to the Value and Description properties on your data item in this case. For this, know that the DataRecord has a DataItem property, so if you change your binding paths to DataItem.Value and DataItem.Description, I believe your MultiDataTrigger will work.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support