Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for FrankLuke
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #290173 | Initial revision | — | about 1 year ago |
Question | — |
Winui 3 Combobox in datagrid not displaying data I am migrating a WPF app to WinUI3. Things went well until I needed to put a combo box in the datagrid. That MS had removed the datagrid from the standard tools was overcome with Community Toolkit Controls. I can make a column with a combobox, but I have not managed to link it correctly to the da... (more) |
— | about 1 year ago |
Comment | Post #287300 |
Thank you for the explanation. It seems odd that EF does not track additions but can detect edits. (more) |
— | about 2 years ago |
Edit | Post #287298 | Initial revision | — | about 2 years ago |
Question | — |
Datagrid in MVVM saves edits but not inserts I am writing a todolist application in WPF with MVVM. I display the goals in a datagrid and the editing works fine. Changes made in the grid are saved to the DB when I click save. However, adding a new record does not persist during a save. Each goal may have subtasks associated with it that are hand... (more) |
— | about 2 years ago |
Edit | Post #287235 |
Post edited: |
— | about 2 years ago |
Edit | Post #287235 | Initial revision | — | about 2 years ago |
Question | — |
How to refer to the same class twice from one Entity Framework entity? I have two classes, Contestant and Picture, with the following setup: public class Contestant { ... public int AvatarID { get; set; } [ForeignKey(nameof(AvatarID))] public virtual Picture? Avatar { get; set; } public virtual ICollection? ... (more) |
— | about 2 years ago |
Comment | Post #286520 |
_context.TagType contains the original items with any edits to them but not any inserts to the list. (I have not coded for deletion yet.) (more) |
— | over 2 years ago |
Edit | Post #286520 | Initial revision | — | over 2 years ago |
Question | — |
C# WPF datagrid not persisting inserts I am working with VS 2022 and trying to make a WPF MVVM application. The application updates the items displayed in the datagrid, persisting the changes to the database upon save. However, adding a new record to the grid does not insert (without extra steps). I imagine I am missing something simple. ... (more) |
— | over 2 years ago |
Comment | Post #286164 |
Amazingly, it does. I hadn't thought of that. When I stepped through, _demo.AllValues showed the complete list inside the debugger. Care to give that as an answer? (more) |
— | over 2 years ago |
Edit | Post #286164 | Initial revision | — | over 2 years ago |
Question | — |
WPF MVVM ListBox not updating I am trying to combine MVVM in WPF using Microsoft.Toolkit.MVVM. Somethings are working as expected. The text boxes bind to fields and update in both directions. The button command executes and changes the values of the instance and in the box. The ListBox shows the initial values. However, the Li... (more) |
— | over 2 years ago |
Comment | Post #284345 |
That works! Thank you! (more) |
— | about 3 years ago |
Edit | Post #284345 | Initial revision | — | about 3 years ago |
Question | — |
Get the length of a slice from a multi-dimensional array If I have a one-dimensional array, I can get the length of it quite easily: `var x = moves.Length()`. However, if the array is multi-dimensional, `.Length()` returns the total number of elements. If moves is defined as `int[4,2]`, the `moves.Length()` returns 8. Is there a way that I can speci... (more) |
— | about 3 years ago |
Comment | Post #280920 |
@FoggyFinder, if you make that an answer, I'd be glad to accept it. The fact that it can't be done. I have no desire to be too clever. (more) |
— | almost 4 years ago |
Edit | Post #280920 |
Post edited: Added backticks for code |
— | almost 4 years ago |
Edit | Post #280920 | Initial revision | — | almost 4 years ago |
Question | — |
Update list based on presence of identifier in a second list In C#, I have two lists and need to mark records in the first based on the second. Here's a sample: ``` public class Vehicle { public string Make { get; set; } public string VIN { get; set; } public string Color { get; set; } public bool HasRegistration { get; set; } = false;... (more) |
— | almost 4 years ago |