datagridview not showing data
I am using a custom object that implements IList:
https://github.com/PhillBenoit/KeyboardGame/blob/master/KeyboardGameV2/src/Scoreboard.cs
I set the data source as the form opens:
https://github.com/PhillBenoit/KeyboardGame/blob/d3d282c948a19f21e20fda36617389ebd4c0ceb4/KeyboardGameV2/Form1.cs#L74
but when items are added, nothing appears:
https://github.com/PhillBenoit/KeyboardGame/blob/d3d282c948a19f21e20fda36617389ebd4c0ceb4/KeyboardGameV2/Form1.cs#L224
15 Replies
You using wpf? What platform is this for?
This is a windows program. Whatever C# does by default. I'm not using any XAML things for the UI. Just whatever visual studio does by default.
What type of project is it? WPF? MAUI? Winforms?
I don't know.
How can you not know what platform you're coding on... Anyway, I'ma check it for u
It's very simple. I don't know anything about making a modern windows application. I knew I wanted to make a program in C# and I let Visual Studio install whatever it wanted for that purpose. I found an option that gave me a windows form and off I went.
From my research your using Winforms, I'ma check if u don't need to notify up of update
I tried adding
dgvScoreboard.Update();
but that did not workChange IList to ObservableCollection
Ilist doesn't notify ui of changes
still nothing
god fucking damnit I hate programing in the dark. There is no reason for this to be so obtuse.
If you don't even know what platform you're coding on, you clearly need to read some more about Winforms, coz you didn't even know u were using it
I have no idea what to even read. Everything I find says I'm doing it right
still stuck on this. Looks like no one knows how to do this outiside of a SQL context
This has still not been resolved
We know, have patience
I think the easiest way would be to transfer the data you want to display to a database and put the datasource as the database
I am just going to do it by hand. As much as I want to use a datasource, it's just going to be slower than doing it by hand.
if that's the only way to do it. which is a thought I have been considering
the tire now preloads the scoreboard datagridview with every possible word from the pool. There is an option to set the minimum length to show after the game. During the game, only found words are shown. They are also masked during the game. I implemented a binary search by hand using the same IComparer used to sort the DataGridView. This all means there is no mapped object. The same data used to keep score is the same shown on the screen.
