Hi,
All rows should be visable, but I would like to disable some of those.There is a sample on the net for a xamDataGrid: http://es.infragistics.com/community/forums/t/25612.aspx
I would like to achive basicly the same, but using the xamGrid instead of the DataGrid.
Hello Konstantin,
Thank you for your post!
I have been looking into it and have created a small sample application for you. In the sample application I have a simple XamGrid bind to a collection. In the resources of the XamGrid I am creating a Style with a DataTrigger. I have bind the trigger to an Age property. Depending of the Value of this property I enable/disable the row.
In order for the style to apply I have handled the CellControlAttached event of the XamGrid. In the handler of the event I get the Control of the Row(the CellsPanel) and apply the style.
Please find the attached sample application and feel free to let me know if you have any further questions on this matter.
Thanks - what I needed was the prim:CellsPanel.
GREAT POST! helped me solve the mystery!
I have been looking into your question. You can remove the key of the Style for the disabled rows. This way the style would apply and there would be no need of the event.
Here is an example of the style:
<Style TargetType="{x:Type igPrim:CellsPanel}">
<Style.Triggers>
<DataTrigger Binding="{Binding Age}" Value="22">
<Setter Property="IsEnabled" Value="False"/>
<Setter Property="TextElement.Foreground" Value="LightGray"/>
</DataTrigger>
</Style.Triggers>
</Style>
Please do not hesitate to let me know if you have any further questions on this matter.
Any Update?
Is there a way to achive this without beeing forced to rely on an event?
Thank you for the feedback. I am glad I was able to help.