Home Forums WPF controls Xceed DataGrid for WPF Error thrown when GroupBy on columns with Null values

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25059 |

    The application that I am working on always experiences a fatal error when i attempt to drag a column to the groupby control and that specific column contains null values. This only happens with null values and not empty strings.

    Is this a bug with the control? Or do i need to specifically handle columns with null values?

    Imported from legacy forums. Posted by Serene (had 454 views)

    User (Old forums)
    Member
    Post count: 23064

    I forgot to mention that I am binding the grid directly to a DataViewCollection..

    Imported from legacy forums. Posted by Serene (had 302 views)

    Xceed Support
    Member
    Post count: 5658

    I was not able to reproduce the behavior using the DataGridCollectionViewSource. Could you post the XAML code you are using?

    Imported from legacy forums. Posted by Jenny [Xceed] (had 260 views)

    User (Old forums)
    Member
    Post count: 23064

    I’ve created a custom control which derives directly from the Xceed DataGrid – CustomDataGrid

    This is the XAML

    <ctrls:CustomDataGrid x:Name=”dataGrid” ItemsSource=”{Binding Path=DataCollectionView}” View=”TableView.Aero.NormalColor” PrintingEnabled=”false” ReadOnly=”true”/>

    The list of objects I am binding to are objects which consists of embedded objects as well
    Example:
    public class ObjectA
    {
    string Name;
    ObjectB ObjectB;
    }

    public class ObjectB
    {
    string Name;
    }

    In codebehind, i do a little processing to cater to this

    DataGridCollectionView view = null;

    view = new DataGridCollectionView(observableCollection);//ObservableCollection<ObjectA>
    view.ItemProperties.Clear();

    view.ItemProperties.Add(new DataGridItemProperty(“ObjectA Name”, “Name”, typeof(string)));
    view.ItemProperties.Add(new DataGridItemProperty(“ObjectB Name”, “ObjectB.Name”, typeof(string)));

    DataCollectionView = view;

    Imported from legacy forums. Posted by Serene (had 336 views)

    Xceed Support
    Member
    Post count: 5658

    I am still not table to reproduce the error you are reporting. Can you send me a project that recreates it to support@xceedsoft.com (make it to my attention)

    Also, what version of the grid are you using?

    Imported from legacy forums. Posted by Jenny [Xceed] (had 4058 views)

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