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
355
XamDataGrid Field layout
posted

Hi
I am wondering about something that has to do with Field layout in the XamDataGrid.

I have an XamDataGrid. The ItemsSource is a buinding to an ObservableCollection of my class. Let's call it "MyClass".

If "FieldLayoutSettings" I have set AutoGenerateFields="False" because I have entered my selected Fields in DataGrid.FieldLayouts.

My problem:
The data is fetched from the database, and the data type of some fields are "Decimal" (because it's defined as "NUMBER" in the Oracle database.

When the datatype is "Decimal", the grid place a rather annoying dollar sign in front if the value in the grid. I'd like to make this go away...

But how?

I tried to set the DataType property in the <Field> to:
 -  DataType="{x:Type String}"
 -  DataType="{x:Type System.String}"
 -  DataType="{x:Type sys:String}"
 -  DataType="String"

...nothing works. All gives the error "The type reference cannot find a public type named 'String'".

Then I tried to change the <Field />" to <UnBoundField />. but still the same problem.

What's the deal with that dollar sign?
I don't even have my culture settings set to US. I have a norwegian setup, so it should at least show "kr" (even if that also would be incorrect because it is only a notmal number)

 - Mats Magnem
KSD Software