Hello,
We are using a C1 DataTable as ItemsSource for a RadGridView. The data provided is shown, but when I click the filterbutton in the header or drop a column on the group area I get a white screen with the message: 'Test1' is not a member of type 'System.Object'. How can I use sorting, filtering and grouping with the C1 DataView?
My code:
---
DataTable table = new DataTable();
table.Columns.Add(new DataColumn("Id", typeof(int)));
table.Columns.Add(new DataColumn("Test1", typeof(string)));
table.Columns.Add(new DataColumn("Test2", typeof(string)));
for (int i = 0; i < 100; i++)
{
DataRow row = table.NewRow();
row["Id"] = i;
row["Test1"] = Guid.NewGuid().ToString();
row["Test2"] = Guid.NewGuid().ToString();
table.Rows.Add(row);
}
TestGridView.Columns.Add(new GridViewDataColumn()
{
DataMemberBinding = new Binding("Id"),
DataType = typeof(int),
HeaderText = "Id"
});
TestGridView.Columns.Add(new GridViewDataColumn()
{
DataMemberBinding = new Binding("Test1"),
DataType = typeof(string),
HeaderText = "Test1"
});
TestGridView.Columns.Add(new GridViewDataColumn()
{
DataMemberBinding = new Binding("Test2"),
DataType = typeof(string),
HeaderText = "Test2"
});
TestGridView.ItemsSource = table.DefaultView;
---
Thanks,
Arjen