I'm a xamDataGrid newbie, so please bear with me. I'm in the process of learning how to use it. I should probably have put my questions in separate posts, but they're probably trivial enough that one person can answer all three.
Thanks!
Brad.
Hello Brad,
Thank you for posting!
I have been looking into your questions.
About question 1:
1.1 You can set the GroupByExpansionIndicatorVisibility property of the XamDataGrid FieldLayoutSettings to 'Collapsed'. This way when the user groups by a field the groups cannot be expanded.
1.2 If you do not want to show the GroupByArea you can set the GroupByAreaLocation property of the XamDataGrid to "None". This way the area would not be visible when the application is started. If you want to hide the area right after the user has grouped the XamDataGrid I can suggest handling the Grouped event of the XamDataGrid and set the 'IsExpanded' property of the GroupByAreaMulti to false. You can use the following code snippet in the handler of the Grouped event: (sender as XamDataGrid).GroupByAreaMulti.IsExpanded = false;
1.3 In what specific order do you want to display the Groups?
About question 2:
2. Regarding the question about the checkbox in the Label of a Field in the XamDataGrid - I can suggest to take a look at the following forum threads where similar scenarios are discussed: http://es.infragistics.com/community/forums/t/61950.aspx, http://es.infragistics.com/community/forums/t/37921.aspx.
About question 3:
3. The TextField of the XamDataGrid uses the XamTextEditor for displaying and editing the data. This is why you can create a style for the XamTextEditor and set the HorizontalContentAlignment property of the XamTextEditor. Here is an example of the above mentioned functionality:
<Style TargetType="{x:Type igEditors:XamTextEditor}">
<Setter Property="HorizontalContentAlignment" Value="Right"/>
</Style>
Please do not hesitate to let me know if you have any further questions on this matter.
Thank-you so much for your quick response!
Hi Brad,
I have been looking into the provided information:
1. In order to expand all of the Groups you have to set the IsExpanded property of the GroupByRecord. You can handle the Grouped event and loop through the Records of the XamDataGrid and set their IsExpanded property to true. If you are using MVVM I can suggest creating a Behavior, where you can implement the above mentioned functionality. Here is an example of the code, that can use in the Grouped event:
foreach (GroupByRecord rec in igDataGrid.Records)
{
rec.IsExpanded = true;
}
2. On the following thread from our forum you can find an example on how you can bind the IsChecked property: http://es.infragistics.com/community/forums/t/83503.aspx.
3. You can set the style using the EditorStyle property for the field, that you want the style to be applied to. Here is a link from our documentation, where you can see an example: http://help.infragistics.com/Help/Doc/WPF/2012.1/CLR4.0/html/InfragisticsWPF4.DataPresenter.v12.1~Infragistics.Windows.DataPresenter.FieldSettings~EditorStyle.html.
I'm getting closer, but I'm not there yet.
Here's an additional (bonus :-) question: with a "normal" checkbox's "IsChecked" binding, I have access to "UpdateSourceTrigger". How do I set that for a "CheckBoxField"?
Thanks again!
OK, I've made some more progress on the grouping:
Left to figure out:
Thank you for the feedback. I am glad that you have found solutions to some of your issue.
Regarding the first one of the two questions in your latest post - as this question is not connected with the once in your original post I could suggest creating a separate forum thread(or a support ticket) as this would helpful is other community members are facing the same issue to find the solution to their issues faster.
Regarding your second question - I can suggest setting the DataItemUpdateTrigger property of the FieldSettings of the XamDataGrid to OnCellValueChange. More about this property you can find on the following link from our documentation: http://help.infragistics.com/Help/Doc/WPF/2015.1/CLR4.0/html/InfragisticsWPF4.DataPresenter.v15.1~Infragistics.Windows.DataPresenter.DataItemUpdateTrigger.html
Perfect. Thanks a lot!
Thank you for the feedback. I am glad I was able to help.