Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Grid Auto generating event not working with Expando #2778

Closed
didi2391 opened this issue Jan 31, 2019 · 6 comments
Closed

Data Grid Auto generating event not working with Expando #2778

didi2391 opened this issue Jan 31, 2019 · 6 comments
Assignees
Labels
DataGrid 🔠 Issues on DataGrid control feature request 📬 A request for new changes to improve functionality

Comments

@didi2391
Copy link

didi2391 commented Jan 31, 2019

Current behavior

DataGrid Autogenerating Column is not working with Expando

Expected behavior

Expecting that Data Grid should also work with Expando for Auto Generating columns if bound with an ItemSource

Minimal reproduction of the problem with instructions

I am using an ObservableCollection which is of type dynamic in my View Model which I am binding it to Data grid Item Source

I will be be adding the Columns dynamically at run time into the Expando object and bind it to the above collection

This behavior is not triggering the Auto Generating Column event

@byrialsen
Copy link

hi @didi2391.

I believe you should check this out

It has a user vote also.

@didi2391
Copy link
Author

didi2391 commented Feb 5, 2019

Thanks @byrialsen

I went through the link provided and it sounds useful if the row details template is simpler to display a string text or static control with some texts. Below is my scenario,

I have a situation where in I need to show hierarchical data (i.e..,) Nested Data Grid upto 3 level and Columns will be decided only during run time

First Column should be given with an Expander control where in the user can expand / collapse to show / hide the row details template. In my case it is Parent Grid -> Child Grid 1(Expander first column) -> Child Grid 2

I can manage to put an expander as first column for my parent grid

But the inner child grids wont be explicitly available to add columns dynamically in code behind since it is wrapped up under data template

Any suggestions would be helpful to extend the above solution for my case

@michael-hawker michael-hawker added DataGrid 🔠 Issues on DataGrid control feature request 📬 A request for new changes to improve functionality labels Feb 6, 2019
@michael-hawker
Copy link
Member

Yeah, it'd be nice to be able to bind directly to a List/ObservableCollection of ExpandoObject. I know this would make it a lot easier to work with the grid in XAML Studio as well.

@michael-hawker
Copy link
Member

@RBrid @harinikmsft any thoughts on this one?

@Kyaa-dost Kyaa-dost added the no-recent-activity 📉 Open Issues that require attention label Oct 2, 2019
@anawishnoff
Copy link

We are not adding features to this DataGrid at this time. If you would like to see this feature in the newly proposed WinUI DataGrid, please add a comment in the WinUI discussion issue. Thanks!

@Kyaa-dost
Copy link
Contributor

Closing the issue as @anawishnoff already responded above with the WinUI discussion link.

@CommunityToolkit CommunityToolkit locked as resolved and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
DataGrid 🔠 Issues on DataGrid control feature request 📬 A request for new changes to improve functionality
Projects
None yet
Development

No branches or pull requests

7 participants