I have some Xmadatagri (version 11.2) on my WPF form, when I get triggers, I want to paint the whole row in yellow Created a style.
& gt; Style target type = "{x: type igDP: DataRecordPresenter}" & gt; & Lt; Style.Triggers & gt; & Lt; Datatrigger binding = "{binding path = some property name names}" value = "1" & gt; & Lt; Setter property = "background" value = "# ECEC85" /> & Lt; / DataTrigger & gt; & Lt; /Style.Triggers> & Lt; / Style & gt;
This is the fact that there is no property in the second grid view model which is using data triggers and it generates a binding exception that I would like to fix, so I think The easiest way to fix this is to apply the style to the first grid but I do not know how to do this ... any help please?
You can give a specific style on the grid. Refer to the code below.
& lt; Page. Resources & gt; & Lt; Style x: key = "first gridrp" target type = "igDP: datacarc presenter" & gt; & Lt; Style.Triggers & gt; & Lt; Datatrigger binding = "{binding path = some property name names}" value = "1" & gt; & Lt; Setter property = "background" value = "# ECEC85" /> & Lt; / DataTrigger & gt; & Lt; /Style.Triggers> & Lt; / Style & gt; & Lt; /Page.Resources> & Lt; Grid & gt; & Lt; IgDP: XamDataGrid x: name = "firstgard" & gt; & Lt; IgDP: XamDataGrid.FieldLayoutSettings & gt; & Lt; IgDP: FieldLayoutSettings DataRecordPresenterStyle = "{StaticResource FirstGridDRP}" /> & Lt; / IgDP: XamDataGrid.FieldLayoutSettings & gt; & Lt; / IgDP: XamDataGrid & gt; & Lt; IgDP: XamDataGrid x: name = "secondsgreat" & gt; & Lt; / IgDP: XamDataGrid & gt; & Lt; / Grid & gt;
No comments:
Post a Comment