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
445
Fixed Groups, CheckBox Header, TextAlignment
posted

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.

  1. I would like to group by one of the fields, but 1) I don't want the group to be expandable/contractable, 2) I don't want to show the "group by area", and 3) I always want the groups to display in a specific order, which may not be alphabetical.
  2. In the examples, there is a nice sample of how to put a Checkbox in the record selector.  The sample includes a checkbox in the grid header to check/uncheck all.  How do I do that in a standard Checkbox column?
  3. I have a TextField column that displays numbers.  I'd like to right-align the text, but 'TextAlignment="Right"' doesn't seem to do it.  How do I do that?

Thanks!

Brad.

Parents
No Data
Reply
  • 22015
    posted

    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.

Children