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
60
Conditional Formatting to show units per cell instead of in the header
posted

I am trying to format units per cell using XamDataGrid in Infragistics version 14.1 and I cannot find any examples.

This table is just an example of what I need to format.  

The units can change depending on the Component.

  Component Value
1 Cu Oxide 50 g
2 DI Water 100 ml
3 H2SO4 500 ml

The current code has the units in the column header but not all values have the same units.

        <igDP:XamDataGrid Name="grid_Dose_Log" HorizontalAlignment="Left" Width="1090" Height="680" Canvas.Left="10" Canvas.Top="58" CellActivating="OnCellActivation">
            <igDP:XamDataGrid.FieldLayoutSettings>
                <igDP:FieldLayoutSettings RecordSelectorLocation="None"  AllowAddNew="False" AllowDelete="False" AutoFitMode="Always"   HighlightAlternateRecords="True" AllowFieldMoving="No"/>
            </igDP:XamDataGrid.FieldLayoutSettings>
            <igDP:XamDataGrid.FieldLayouts>
                <igDP:FieldLayout>
                    <igDP:Field Name="Date"   Width="150">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields" >
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamDateTimeEditor}">
                                        <Setter Property="Mask" Value ="mm/dd/yyyy hh:mm"/>
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                        <Setter Property="AllowDropDown" Value="False" />
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>
                    <igDP:Field Name="Bath"   Width="80">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields">
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamNumericEditor}">
                                        <Setter Property="Mask" Value ="{}{double:1.0}"/>
                                        <Setter Property="PromptChar"  Value=""/>
                                        <Setter Property="SelectAllBehavior" Value="SelectEnteredCharacters" />
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                        <Setter Property="Value" Value="0"/>
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>
                    <igDP:Field Name="Tank"  Width="120">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields"  >
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamTextEditor}">
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                        <Setter Property="IsReadOnly"   Value="True" />
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>
                    <igDP:Field Name="Constituent"  Width="200">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields"  >
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamTextEditor}">
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                        <Setter Property="IsReadOnly"   Value="True" />
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>
                    <igDP:Field Name="Requested" Width="100" Label="Requested (ml)">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields">
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamNumericEditor}">
                                        <Setter Property="Mask" Value ="{}{double:8.1ml}"/>
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>
                    <igDP:Field Name="Totalized"   Width="100" Label="Totalized (ml)">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields">
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamNumericEditor}">
                                        <Setter Property="Mask" Value ="{}{double:8.1}"/>
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>
                    <igDP:Field Name="Time" Width="100" Label="Time (sec)">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields">
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamNumericEditor}">
                                        <Setter Property="Mask" Value ="{}{double:8.1}"/>
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>
                    <igDP:Field Name="Rate" Width="100" Label="Rate (ml/min)">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields">
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamNumericEditor}">
                                        <Setter Property="Mask" Value ="{}{double:8.1}"/>
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>

                    <igDP:Field Name="Auto"  Width="60">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields">
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamCheckEditor}">
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>
                    <igDP:Field Name="Error"  Width="60">
                        <igDP:Field.Settings>
                            <igDP:FieldSettings LabelTextAlignment="Center" LabelClickAction="SortByMultipleFields">
                                <igDP:FieldSettings.EditorStyle>
                                    <Style TargetType="{x:Type igEditors:XamCheckEditor}">
                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
                                    </Style>
                                </igDP:FieldSettings.EditorStyle>
                            </igDP:FieldSettings>
                        </igDP:Field.Settings>
                    </igDP:Field>
                    
                </igDP:FieldLayout>
            </igDP:XamDataGrid.FieldLayouts>
        </igDP:XamDataGrid>

Parents
No Data
Reply Children
No Data