ExpandoObject (dynamic object) data binding?

1 Answer 235 Views
DataGrid Entry
Nicholas
Top achievements
Rank 1
Nicholas asked on 29 Nov 2022, 07:02 PM | edited on 29 Nov 2022, 07:04 PM

HI, I am evaluating the maui UI but only found out the data binding for expandoobject or dynamicobject is not working, is this a true limitation?

i believe this was supported in wpf or uwp, any reason why this is the case for net maui? it seems such an easy thing to support...

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 30 Nov 2022, 08:20 AM | edited on 01 Dec 2022, 09:05 AM

Hello Nicholas,

Thank you for you interest in Telerik .NET MAUI DataGrid control.

I have logged the described scenario as a feature request on your behalf: https://feedback.telerik.com/maui/1588977-datagrid-add-support-for-visualization-of-dynamic-type-of-data  Cast your vote for the item and follow it to receive email notifications when there is an update. 

Currently I cannot suggest you any suitable approach that will be working as expected in all scenarios when visualizing dynamic type of data. 

Let me know if you have any additional questions.

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Nicholas
Top achievements
Rank 1
commented on 30 Nov 2022, 11:54 AM | edited

Well, it's kind of weird and maybe you can let me know the trick.

what i found out is your data binding treated Idictionary differently

public class DictionaryObject : Idictionnary<xxx> {

public object id => this["id"];

}

this will not work for binding id even though i created a property.

 

but

public class test  {

public DictionaryObject Data {get;set;}

public object id => this.Data["id"];

}

here databinding works.

Didi
Telerik team
commented on 30 Nov 2022, 12:06 PM

Hello,
I understand that in some cases it seems the Grid supports dynamic objects, still, features like editing, sorting, filtering won't work in most of the scenarios. 

ExpandoObject, dynamic objects are not fully tested with all DataGrid features. That's why I have logged a feature request on your behalf for providing a support for this.

You can check whether the DataGrid will populate the data in the exact scenario you have.

Tags
DataGrid Entry
Asked by
Nicholas
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or