I've got some 64bit integers selected into a datatable, which was previously connected to a Xceed datagrid (free), but since moving to xamDataGrid (paid annual subscription) I cannot make it display 64 bit integers, it just puts some strange text in it.
The SQL to get the data looks like:
select Cast(mtr.ID as varchar) as ID2, mtr.* from mtr Inner Join recentCaseLog on recentCaseLog.MtrID=Mtr.ID
The ID field is selected normally as part of the select mtr.* and also converted to a varchar as ID2
The results in the grid are as follows:
ID2: 1180744ID: {1umber:–1223372036854775808-8223372036854775807}
I've explored the dataset as it's populated, via the debugger.
ID2:
Value:"1180744" Type: string
ID:
Value: 1180744 Type: long
Can anyone suggest a solution to this?
Thanks,
- Anthony
hi
you also solve this problem to with following xaml code:
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamMaskedEditor}" >
<Setter Property="Mask" Value="-nnnnnnnnnnnnnnnnnnn" />
<Setter Property="PromptChar" Value=""/>
</Style>
</igDP:FieldSettings.EditorStyle>
I've found a fix that almost works elsewhere in the forum, but sometimes defaultfieldlayout is null, what should use if this is the case? (I've added a check to skip this when null, but this causes some grids not to be correctly displayed.)
foreach ( Field field in xamDataGrid1.DefaultFieldLayout.Fields )
{
if ( typeof( Int64 ) == field.DataType )
Style style = new Style( typeof( XamMaskedEditor ) );style.Setters.Add( new Setter( XamMaskedEditor.MaskProperty, "-nnnnnnnnnnnnnnnnnnn" ) );
style.Seal( );
field.Settings.EditorStyle = style;
}