|
-
Jul 10th, 2025, 12:19 PM
#1
Thread Starter
Frenzied Member
Issue with Datagridview in a Groupbox
I'm having a problem with a DGV in a Groupbox. When I populate the rows, only the highlighted row shows the cell contents. The rest are blank. When I click on each row the cell contents shows for that row & the previously highlighted row goes blank. So all the values are there, but only the highlighted row shows its contents & all the other rows show empty cells. If I move the DGV out of the Groupbox then all the rows cell contents are visible. Has anyone seen this before? Is there a workaround?
-
Jul 10th, 2025, 01:17 PM
#2
Re: Issue with Datagridview in a Groupbox
Need more information.
Is this a .Net Framework or Core?
Need to see the relevant code.
I was curious and tested this problem. Framework project, I added a groupbox to a form, added a dgv to the groupbox, in FormLoad I assigned a datatable as the dgv datasource. It worked fine.
-
Jul 10th, 2025, 01:23 PM
#3
Thread Starter
Frenzied Member
Re: Issue with Datagridview in a Groupbox
Interesting that it worked for you. It's a .Net Framework project. I'm populating the DGV manually, 1 row at a time. Also the Groupbox is on a TabPage of a TabControl. Not sure if that makes a difference.
-
Jul 10th, 2025, 01:42 PM
#4
Re: Issue with Datagridview in a Groupbox
Works in a tabcontrol just fine. Have you tested it, add a form, drop a tabcontrol, groupbox, dgv, and populate in formload event.
Still no code.
-
Jul 10th, 2025, 01:55 PM
#5
Thread Starter
Frenzied Member
Re: Issue with Datagridview in a Groupbox
I didn't create a new project to test it. I just discovered it didn't work as expected in my current project.
What code do you want to see? It's just using the DataGridView.Rows.Add() method in a loop. My code iterates through the nodes of a JSON string & adds the info to the DGV.
-
Jul 11th, 2025, 02:30 AM
#6
Re: Issue with Datagridview in a Groupbox
Show us all the code we need to replicate your scenario. This is not normal behaviour so it's something specific causing it, so we need all the specifics. Even then, it may still just be something dodgy on your system. You really should have tested in a new project even before posting here though. If it's something specific to that project then you will be able to work that out for yourself and we won't be able to help you fix an issue that we can't replicate. Sometimes a project gets corrupted and it's not easy to work out how or how to fix it and the best solution is to copy all the parts over to a new project, so that may be what you need to do. There's steps you should be taking yourself before that though. Only if you can replicate the issue should we bother even trying.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|