Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7895989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:46:41+00:00 2026-06-03T07:46:41+00:00

So I have a simple window which contains only a XamDataGrid that holds preview

  • 0

So I have a simple window which contains only a XamDataGrid that holds preview data of a dynamic query generated at run-time…

public partial class DataPreview : Window
{
    public DataTable Data { get; set; }
    public DataPreview(string SQL)
    {
        InitializeComponent();

        this.DataContext = this;
        Data = DatabaseManager.ExecuteQuery(SQL);
    }
}

I have databound to the datasource of the XamDataGrid…

<igDP:XamDataGrid DataSource="{Binding Data}" ScrollingMode="Immediate">
     <igDP:XamDataGrid.FieldSettings>
          <igDP:FieldSettings
             AllowEdit="False"/>
     </igDP:XamDataGrid.FieldSettings>
</igDP:XamDataGrid>

Now this all works fine, the problem is the datatype of the editor in the XamDataGrid does not match the datatype of the field sometimes. For example all numerics show with a dollar sign. I tried to add this line…

EditAsType="{x:Type sys:String}"

Which fixed everything except actual currency amounts, which now display as xx.xxxx with no dollar sign. All the solutions I have found online seem to edit the field’s directly in the xaml, but since the fields are all dynamic this is not an option. Is there something I can do to set the editors correctly in the xaml? Or some routine I can do in the code to massage the data into displaying correctly from the XamDataGrid? Can anyone share any code using XamDataGrid in a related way with all dynamic columns, but able to format them correctly based on datatype?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:46:42+00:00Added an answer on June 3, 2026 at 7:46 am

    The editor that is used for a field of a specific type can be set using the ValueEditor.RegisterDefaultEditorForType. If the editor is the correct type and you are looking to change the mask for a given type then you could use the XamMaskedEditor.RegisterDefaultMaskForType.

    If you are looking to set the mask or the editor differently for different fields of the same type, then you would need to do this in code after the FieldLayout has been created. For this you could use the FieldLayoutInitialized event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't run an simple XNA window in fullscreen when I have hooked up
I have a listview that contains values from webservice.Each page contains only 10 listitems
I have a window which contains a QTreeView ( databaseTreeView ) on a subclass
I have a WPF / XAML Window that contains a ComboBox that is giving
I have a simple WrapPanel which contains a number of wide controls. When I
I've made a wxPerl application which presents just a simple frame which only contains
I have a spreadsheet which contains 'unique' IDs. The problem is that they are
I have a simple WIX installer which will install a Windows Service. I have
I have very simple window where I have 2 buttons - one for cancel,
My i have to develop simple window based iphone application. In my first screen

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.