View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004232 | NoesisGUI | Studio | public | 2025-06-06 18:22 | 2025-06-11 13:16 |
| Reporter | relacad | Assigned To | sfernandez | ||
| Priority | normal | Severity | minor | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | Studio_Beta | ||||
| Target Version | Studio_Beta | Fixed in Version | Studio_Beta | ||
| Summary | 0004232: GridView Not Building Proper xaml binding for headers. Failing to update with changes to ViewModel Data Structures. | ||||
| Description | Problem: GridView when selected, creates a <GridView/> tag that does not update with changes to data binding, making it impossible to display a GridView of Items from ItemSource without manually modifying .xaml file.
Originally posted about it on Studio Forum: I found out that when I rebuilt the exact same data-template from scratch in my other project, the listview, unfortunately never displayed as a GridView, even though the option is selected. I think there is something funky going on between the studio assignment of gridview and the instance of it. Looking at the XAML for the default GridView configuration from your project:
Vs the one in my project when I create a ListView and set it to GridView via the View Property I get the following code:
The other thing I noticed is when I go to your original project and change the ListView View type to "none", and then back to "GridView" via the properties panel the XAML changes to produce the same <GridView/> that produces no GridView column binding:
I tested adding custom templates with headers, and more. Unforunately the only way I could get the GridView to behave as described in my source project was replacing the <GridView/> with the functioning sample code directly in the MainPage.xaml . Is this working as intended or have I encountered a bug? | ||||
| Platform | Any | ||||
|
The GridView has a property named Columns that yoou need to manually populate with the desired columns. In my project I created 3 columns and manually set for each one of them the Header and the DisplayMemberBinding (by typing in the Path edit box the name of the view model property I want to assign to each column). As I explained in the forums there is no way to automagically generate the GridView columns from a view model. Only the rows are auto generated when ListView.ItemsSource is assigned to a collection. Hope this clarifies what I meant. |
|
|
Hey Sfernandez, Thanks much for helping clarify this. I figured out how to actually get it working and populate the ListView with data as described, but not entirely in studio. At the ListView View.GridView level, it was impossible to directly define columns for me. I could add a column to ColumnCollection, but these would not create an automatic binding with the ListView.ItemsSource. It took me awhile to realize that the columns inside of the <GridViewColumnCollection> in the .xaml wouldn't work for the binding for the ListView, not sure why. So to make it work I had to go into the .xaml of the page and remove the <GridViewColumnCollection> tags around the columns I created in Studio in order to match the code you had in your sample, where the columns were not within the ...ColumnCollection Tag. I think that's why it was hard for me to see how you defined your columns, because in the Studio ui I couldn't see the definitions, it showed up as "none" for ColumnCollection, I had to find them in the .xaml (image for reference). I might be blind and the columns are easily accessible in UI somewhere else, avoiding this whole manual .xaml tweak, or it be a feature/bug to have the columns defined in this way. In any case I'm happy to say I got my desired feature working thanks to a small tweak in VScode, and can now complete the designs I was trying to accomplish. |
|
|
Perhaps you were using an older version of Studio, try downloading 0.1.224. Then select the ListView control itself (not inside its template or the item container template), and assign a GridView to the View property. |
|
|
Hey Sfernandez, Updating to .224 did the trick! Thanks! On that note, it would be great if the launcher could indicate if a newer version is available! Cheers! |
|
|
| it would be great if the launcher could indicate if a newer version is available |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-06-06 18:22 | relacad | New Issue | |
| 2025-06-09 13:55 | jsantos | Description Updated | |
| 2025-06-09 13:55 | jsantos | Assigned To | => sfernandez |
| 2025-06-09 13:55 | jsantos | Status | new => assigned |
| 2025-06-09 13:55 | jsantos | Target Version | => Studio_Beta |
| 2025-06-09 14:28 | sfernandez | Status | assigned => feedback |
| 2025-06-09 14:28 | sfernandez | Note Added: 0010801 | |
| 2025-06-10 00:24 | relacad | Note Added: 0010806 | |
| 2025-06-10 00:24 | relacad | File Added: GridViewHeaderItem No Column binding visible.png | |
| 2025-06-10 00:24 | relacad | File Added: columncollection empty.png | |
| 2025-06-10 00:24 | relacad | Status | feedback => assigned |
| 2025-06-10 10:35 | sfernandez | Note Added: 0010808 | |
| 2025-06-10 10:35 | sfernandez | File Added: GridView.Columns.png | |
| 2025-06-10 10:35 | sfernandez | Status | assigned => feedback |
| 2025-06-10 18:54 | relacad | Note Added: 0010809 | |
| 2025-06-10 18:54 | relacad | Status | feedback => assigned |
| 2025-06-10 18:54 | relacad | Note Edited: 0010809 | |
| 2025-06-11 13:16 | sfernandez | Note Added: 0010811 | |
| 2025-06-11 13:16 | sfernandez | Status | assigned => resolved |
| 2025-06-11 13:16 | sfernandez | Resolution | open => fixed |
| 2025-06-11 13:16 | sfernandez | Fixed in Version | => Studio_Beta |