Windows Develop Bookmark and Share   
 index > Windows Forms General > datagridView question
 

datagridView question

I have table that looks like this:

ID_BILL XXXX YYYY
---------------------------------
1 aa bb
1 cc dd
1 fg 33
2 df fgb
2 dd 33

Now I want it to look like this:

ID_BILL XXXX YYYY
---------------------------------
1 aa bb
cc dd
fg 33
2 df fgb
dd 33

I want those munbers to be missing.




  • Moved byTaylorMichaelLMVPWednesday, September 09, 2009 3:28 PMWinForms related (From:Visual C# General)
  •  
roko1234  Wednesday, September 09, 2009 3:25 PM
There is no way that I know of to make this happen automatically in the DataGridView.

You would need to modify the table manually to achieve this affect.

OR

There are third-party grid products that do this type of grouping.

Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Wednesday, September 09, 2009 3:53 PM
Yes you have to do it programmatically.
you canmodify the values of the duplicate ids to "string.Empty" if its a string or null also.

- Paras
paras kumar  Wednesday, September 09, 2009 5:47 PM

Hi,

There is one FAQ tells about this. Check the value, if duplicate, set the value to string.Empty. The FAQ also shows painting grouped DataGridView.

8. How to display grouped data in a DataGridView?

http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/a44622c0-74e1-463b-97b9-27b87513747e#faq8

Best regards,

Ling Wang


Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Ling Wang  Wednesday, September 16, 2009 12:14 PM
There is no way that I know of to make this happen automatically in the DataGridView.

You would need to modify the table manually to achieve this affect.

OR

There are third-party grid products that do this type of grouping.

Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Wednesday, September 09, 2009 3:53 PM
Yes you have to do it programmatically.
you canmodify the values of the duplicate ids to "string.Empty" if its a string or null also.

- Paras
paras kumar  Wednesday, September 09, 2009 5:47 PM
Where is your XXXX YYYYYY data coming from?

Are you reading from a file? Are the users entering it on your screen?

Is the ID_Bill also on the file or being entered, or is it sequentially assigend as the grid as built?
JimGuyer  Wednesday, September 09, 2009 7:14 PM

Hi,

There is one FAQ tells about this. Check the value, if duplicate, set the value to string.Empty. The FAQ also shows painting grouped DataGridView.

8. How to display grouped data in a DataGridView?

http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/a44622c0-74e1-463b-97b9-27b87513747e#faq8

Best regards,

Ling Wang


Please remember to click “Mark as Answer�on the post that helps you, and to click “Unmark as Answer�if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Ling Wang  Wednesday, September 16, 2009 12:14 PM

You can use google to search for other answers

Custom Search

More Threads

• Ability to create MMC snap in's
• Two method in diffrend thread?? How?
• Disable a group of buttons using the Tag property
• Excel output formatting - GridLines pretty please ?
• Magic Issue of ZoomFactor of RichTextBox!
• .NET Label not Refresh()'ing
• Executing HTML from a VB2005 Windows Application
• How to pass Null value to query on a field from Dataset
• Window SHOW event???
• panel