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
1564
hierarchical set of datas ?
posted

 Hi,

 I have a hierarchical set of datas like this :

public class RadiosGenre
{
    public List<Radio> Radios;
}

and I would like to put them in the xamDataGrid... and if possibe with "lazy loading"

Is it possible and how ?

 I have try with the following code but it do not work  :

 

        <igDP:XamDataGrid x:Name="xdgGenres">
            <igDP:XamDataGrid.FieldLayoutSettings>
                <igDP:FieldLayoutSettings AutoGenerateFields="False" />
            </igDP:XamDataGrid.FieldLayoutSettings>
            <igDP:XamDataGrid.FieldLayouts>
                <igDP:FieldLayout>
                    <igDP:FieldLayout.Fields>
                        <igDP:Field Name="Title" Label="Title"/>
                        <igDP:Field Name="Radios"/>
                    </igDP:FieldLayout.Fields>
                </igDP:FieldLayout>
            </igDP:XamDataGrid.FieldLayouts>
        </igDP:XamDataGrid>

  • 8576
    Offline posted
    Hi -
     
    The XamDataGrid definitely supports the display of hierarchical data.  You can define the Fields and FieldLayouts manually as you have shown in your XAML snippet, or you can simply bind the XamDataGrid to your hierarchical data source (viathe XamDataGrid's DataSource property) and let the XamDataGrid automatically 'discover' the FieldLayouts and Fields in your data and generate the definitions for you.
     
    JoeM
     
    • 1564
      posted in reply to Joe Modica

       Thanks a lot,

       Also, is it possible to :

      - Have only one header (and not a header for each level) ?
      - Have the last column to use the full width ... to force last column use the maximum of space ?

       Thanks

       

      VO01 

      • 8576
        Offline posted in reply to VO 01
        Your welcome.
         
        Yes - you can control whether headers appear for each level, i.e. FieldLayout, by setting the LabelLocation property on FieldLayoutSettings to Hidden.
         
        The XamDataGrid exposes an AutoFit property that will force all columns to fit within the control's width by carving up the available space into euqal increments for each column.   The XamDataGrid does not currently expose a property that autofits just the last column.  You can submit a feature request for this functionality here: http://devcenter.infragistics.com/Protected/RequestFeature.aspx
         
        Joe Modica