This is a migrated thread and some comments may be shown as answers.

Jagged Arrays and the Grid

1 Answer 70 Views
Grid for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shawn
Top achievements
Rank 1
Shawn asked on 27 Sep 2013, 02:20 AM
We're finding that if we data bind to a collection that doesn't have all the properties that the columns are bound to that the cells are being generated but never data bound (as expected) but hiding those cells have been difficult. I wanted to ask if they could put in a debug.write if the property isn't found (as a data binding failure) so we know that it is happening. The problem for us is that the properties don't exists on all rows.

We're overcoming the problem by adding the properties manually with null values. This work around fixes it except when virtualization fires. Any chance you're expecting the values in some ordinal order? 

For background, we're binding to dynamic objects (ExpandoObjects) so that the property values aren't necessarily in the right ordinal. Again this works until we hit virtualized rows then the binding seems to fail unexpectedly.

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 30 Sep 2013, 04:09 PM
Hi Shawn,

Thank you for the question.

The first dynamic object, available in the ItemsSource defines the schema (Columns and DataTypes) of the Grid. For dynamic objects that do not have a value for the generated schema a "null" value is returned.

I am not sure I completely understand your scenario. What do you mean by "hiding cells"? As to your question - the ExpandoObject value lookup implementation does not depend on some ordinal order.

Could you please prepare a simple demo project that illustrates the issue (you will need to open a support ticket to enable file attachment) so that I can debug it locally and further help you with the case?

I am looking forward to your reply.

Regards,
Georgi
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Grid for XAML
Asked by
Shawn
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or