agent4125
agent4125
CC#
Created by agent4125 on 5/26/2023 in #help
❔ Binding question for winforms DataGridView
Anyone else have an idea? Thanks.
12 replies
CC#
Created by agent4125 on 5/26/2023 in #help
❔ Binding question for winforms DataGridView
I managed to do it with a listview in WPF, but can't see how it's done in winforms with a DataGridView. This is how I did it in WPF... GridViewColumn gcol = new GridViewColumn(); gcol.Header = "Name"; gcol.CellTemplate = template; lvViewGridView.Columns.Add(gcol); ////////////////////////////////////////////////////////////////////////////////// for (int i = 2; i < 10; i++) { gcol = new GridViewColumn(); gcol.Header = "Column " + i.ToString(); gcol.DisplayMemberBinding = new Binding("[col" + i.ToString() + "].Value"); lvViewGridView.Columns.Add(gcol); }
12 replies
CC#
Created by agent4125 on 5/26/2023 in #help
❔ Binding question for winforms DataGridView
because I'm reading columns from a table, but they won't be fixed, hence I can't have fixed named properties
12 replies
CC#
Created by agent4125 on 5/26/2023 in #help
❔ Binding question for winforms DataGridView
yes, each row will have a dictionary<string,string>
12 replies