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
470
Problems displaying random database selections
posted

I use XamDataGrid to display results of execution of randomly created SQL “SELECT” statements (via DataTable.DefaultView). Neither number of fields being retrieved nor their types are known at design time.

Please advise how to setup XamDataGrid to avoid these problems:
1. Dollar sign prefixes all decimal values – need to get rid of dollar sign as those values are NOT currency
2. Message “A first chance exception of type 'System.NullReferenceException' occurred in Infragistics3.Wpf.Editors.v9.1.dll” is added every time I scroll the grid. Due to this inner exception throwing the scrolling makes a tiny pause after every line. This occurs even when the solution is compiled in ‘Release’ configuration.

Here is XAML code I’m using:
<infragisticsGrid:XamDataGrid x:Name="PART_XamDataGrid" DataSource="{Binding}"    ScrollingMode="Immediate" RecordLoadMode="PreloadRecords"  RecordContainerGenerationMode="PreLoad">

 <infragisticsGrid:XamDataGrid.FieldSettings>
  <infragisticsGrid:FieldSettings
   AllowRecordFiltering="False"
   AllowEdit="False"
   CellClickAction="SelectRecord"
   EditorType="{x:Type infragisticsEditors:XamNumericEditor}"
   LabelClickAction="SortByOneFieldOnly"
   LabelTextWrapping="WrapWithOverflow"
   AllowSummaries="true"
   SummaryUIType="SingleSelectForNumericsOnly"
   SummaryDisplayArea="Top"
   LabelTextAlignment="Center">
  </infragisticsGrid:FieldSettings>
 </infragisticsGrid:XamDataGrid.FieldSettings>

 <infragisticsGrid:XamDataGrid.FieldLayoutSettings>
  <infragisticsGrid:FieldLayoutSettings
                  AutoGenerateFields="True"
   AllowFieldMoving="Default"
                  LabelLocation="SeparateHeader"
   HighlightAlternateRecords="True"
                  RecordSelectorLocation="Default"
                  AutoArrangeCells="LeftToRight"
                  SelectionTypeRecord="Single"
   DataRecordSizingMode="SizedToContentAndIndividuallySizable">
  </infragisticsGrid:FieldLayoutSettings>
 </infragisticsGrid:XamDataGrid.FieldLayoutSettings>

 <infragisticsGrid:XamDataGrid.ViewSettings>
  <infragisticsGrid:GridViewSettings Orientation="Vertical" />
 </infragisticsGrid:XamDataGrid.ViewSettings>
</infragisticsGrid:XamDataGrid>

Thank you,

Eugene