Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • dar100111
    Participant
    Post count: 11

    Sorry disregard Fawzi. I just saw dv.DistinctValuesConstraint = DistinctValuesConstraint.FilteredWithAllFilters;

    fixes that problem! Thanks!

    dar100111
    Participant
    Post count: 11

    Hi Fawzi! Is there no plan to change this still, or has it been fixed recently? It causes a lot of confusion on the user end. Thanks!

    dar100111
    Participant
    Post count: 11

    Hi Fawzi! Thanks for the insite. Looks like we posted at the same time. Great to hear there is a fix incoming!

    dar100111
    Participant
    Post count: 11

    Update.

    I found out these text fields have newline chars in the Oracle DB2 database. CHR(10) and CHR(13) if anyone is ever having issues with this.

    Is there a way to prevent errors like this in the datagrid when there are special characters in the fields?

    In the meantime I have replaced those characters in the queries that pull but would be great to find a better approach on the Datagrid to prevent critical errors like this one!

    dar100111
    Participant
    Post count: 11

    Just wanted to put an example on here. No issue. I’ve seen posts of people trying to display total items vs filtered items. This example works for people that do their bindings in C# not XAML

    dar100111
    Participant
    Post count: 11

    Hi Fawzi! I was just able to figure this out actually using one of the sample apps.

    <xcdg:DataGridControl.DefaultGroupConfiguration>
                    <xcdg:GroupConfiguration InitiallyExpanded="False" DefaultHeadersFootersType="None" >
                        <xcdg:GroupConfiguration.Headers>
                            <xcdg:GroupHeaderFooterItemTemplate VisibleWhenCollapsed="True" >
                                <DataTemplate>
                                    <xcdg:StatGroupHeaderControl ShowGroupLabel="True">
                                        <xcdg:StatGroupHeaderControl.Cells>
                                            <xcdg:StatCell FieldName="GROSS_PERFORMANCE" ResultConverterParameter="[P2]"
                                  ResultPropertyName="GCALC"/>
                                            <xcdg:StatCell FieldName="NET_PERFORMANCE" ResultConverterParameter="[P2]"
                                  ResultPropertyName="NCALC"/>
                                            <xcdg:StatCell FieldName="TOTAL_BUSINESS_DAYS" ResultConverterParameter="[0.00] (StDev)"
                                  ResultPropertyName="TBUSDAYS"/>
                                            <xcdg:StatCell FieldName="TOTAL_CALENDAR_DAYS" ResultConverterParameter="[0.00] (StDev)"
                                  ResultPropertyName="TCALDAYS"/>
                                            <xcdg:StatCell Foreground="Red" FieldName="GROSS_LATE_COUNT" ResultConverterParameter="(Gross Late) [N0]"
                                  ResultPropertyName="GLATE"/>
                                            <xcdg:StatCell Foreground="Red" FieldName="NET_LATE_COUNT"   ResultConverterParameter="(Net Late) [N0]"
                                  ResultPropertyName="NLATE"/>
                                            <xcdg:StatCell Foreground="#009900" FieldName="GROSS_CALC"   ResultConverterParameter="(Gross Ontime) [N0]"
                                  ResultPropertyName="GONTIME"/>
                                            <xcdg:StatCell Foreground="#009900" FieldName="NET_CALC"     ResultConverterParameter="(Net Ontime) [N0]"
                                  ResultPropertyName="NONTIME"/>
                                        </xcdg:StatGroupHeaderControl.Cells>
                                    </xcdg:StatGroupHeaderControl>
                                </DataTemplate>
                            </xcdg:GroupHeaderFooterItemTemplate>
                        </xcdg:GroupConfiguration.Headers>
                    </xcdg:GroupConfiguration>
    
                </xcdg:DataGridControl.DefaultGroupConfiguration>

    For anyone else’s reference

     DataGridCollectionView dv =  new DataGridCollectionView(dt.DefaultView);
                    dv.DistinctValuesConstraint = DistinctValuesConstraint.Filtered;
                    dv.AutoFilterMode = AutoFilterMode.And;
    
                    ////GROUP DESCRIPTION FOOTER ROW
                    AverageFunction gPerf = new AverageFunction();
                    gPerf.ResultPropertyName = "GCALC";
                    gPerf.SourcePropertyName = "GROSS_CALC";
    
                    AverageFunction nPerf = new AverageFunction();
                    nPerf.ResultPropertyName = "NCALC";
                    nPerf.SourcePropertyName = "NET_CALC";
    
                    StandardDeviationFunction sdvCal = new StandardDeviationFunction();
                    sdvCal.ResultPropertyName = "TCALDAYS";
                    sdvCal.SourcePropertyName = "TOTAL_CALENDAR_DAYS";
    
                    StandardDeviationFunction sdvBus = new StandardDeviationFunction();
                    sdvBus.ResultPropertyName = "TBUSDAYS";
                    sdvBus.SourcePropertyName = "TOTAL_BUSINESS_DAYS";
    
                    SumFunction ttlLate = new SumFunction();
                    ttlLate.ResultPropertyName = "GLATE";
                    ttlLate.SourcePropertyName = "GROSS_LATE_COUNT";
    
                    SumFunction ttlOntime = new SumFunction();
                    ttlOntime.ResultPropertyName = "NLATE";
                    ttlOntime.SourcePropertyName = "NET_LATE_COUNT";
    
                    SumFunction gOntime = new SumFunction();
                    gOntime.ResultPropertyName = "GONTIME";
                    gOntime.SourcePropertyName = "GROSS_CALC";
    
                    SumFunction nOntime = new SumFunction();
                    nOntime.ResultPropertyName = "NONTIME";
                    nOntime.SourcePropertyName = "NET_CALC";
    
                    dv.StatFunctions.Add(gPerf);
                    dv.StatFunctions.Add(nPerf);
                    dv.StatFunctions.Add(sdvCal);
                    dv.StatFunctions.Add(sdvBus);
                    dv.StatFunctions.Add(gOntime);
                    dv.StatFunctions.Add(nOntime);
                    dv.StatFunctions.Add(ttlLate);
                    dv.StatFunctions.Add(ttlOntime);
    
    dar100111
    Participant
    Post count: 11

    Can you only call this by Integer? I want to be able to click on a cell, get the value in the clicked cell or a value in the same row above by Column Name.

Viewing 7 posts - 1 through 7 (of 7 total)