Home Forums WPF controls Xceed DataGrid for WPF Binding the grid to a dataTable, but doubles not appearing

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Xceed Support
    Member
    Post count: 5658
    #22166 |

    Hi,

    I was wondering if you could possibly help me?

    I’ve got a little problem with Xceed DataGrid for WPF, but this problem may be due to stupidity on my part.

    XAML:

    <Custom:DataGridControl ItemsSource=”{Binding DataTable}”/>

    View Model.cs:

    public DataTable DataTable
    {
    get { return _dataTable; }

    set
    {
    _dataTable = value;
    OnPropertyChanged(dataTableProperty);
    }
    }

    The DataTable is contained within a dataSet.

    I am using auto generated columns

    – The column headers are displaying correctly (these are all strings).

    – All string cell values are displaying correctly.

    – But, all my double cell values are appearing in the datagrid as blanks.

    Any ideas as to where I might be going wrong?

    Many thanks for your help,

    Simon

    Imported from legacy forums. Posted by Simon (had 3658 views)

    User (Old forums)
    Member
    Post count: 23064

    That is strange… We have lots of tests and samples that bind to a DataTable which contains various data types, including doubles, and have never hit this problem…

    Are you using any custom CellContentTemplates in your grid?

    And do those cells actually have a value in the source DataTable? (Sorry for asking this apparently dumb and obvious question, but it still is worth checking…)

    Imported from legacy forums. Posted by Pascal (had 243 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Pascal,

    Thank you for your reply.

    I have double-checked that we have values in the source DataTable (we do).

    We are not using custom CellContentTemplates in the grid.

    I have created a simple Visual Studio project that recreates the problem. Would you like me to email it to you?

    Many thanks,

    Simon

    Imported from legacy forums. Posted by Simon (had 240 views)

    User (Old forums)
    Member
    Post count: 23064

    Yes, you can send the zipped project to support@xceedsoft.com, with “For Pascal” in the subject line.

    Thanks!

    Imported from legacy forums. Posted by Pascal (had 207 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Pascal,

    Many thanks – I have just sent a zip to you.

    Simon

    Imported from legacy forums. Posted by Simon (had 4669 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.