Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hello, I have nothing of the code, I have a datagridview which is filled programatically, and first column DATAINPUTID is value that is the same for multiple rows

what I want to is to group rows with the same DATAINPUTID but as I said, I have no code. that is my problem, and if anyone has some solution or idea, it would be of much help to me, thank you!!!
Posted

1 solution

Try looking here.
BeaCosta is also a fountain of knowledge - assuming you're doing c# WPF

http://marlongrech.wordpress.com/2008/11/22/icollectionview-explained/[^]
 
Share this answer
 
v2
Comments
shonezi 27-Jul-12 5:45am    
unfortunately I am working in windows form application, not WPF
Erik Rude 27-Jul-12 6:15am    
Please improve your question by being specific to the technology you're using, that will help getting better answers.
Also it may give you some good search phrases to put into google. And links to articles that may help your understanding.
shonezi 27-Jul-12 7:25am    
I have a windows form application in C#, the code on form load is

daActivity.SelectCommand = new SqlCommand("SELECT * from DataActivity", cs);
dsActivity.Clear();
daActivity.Fill(dsActivity);

ActivityBS.DataSource = dsActivity.Tables[0];

dg.DataSource = ActivityBS;

this.dg.Sort(this.dg.Columns["DataInputID"], ListSortDirection.Descending);

where dg is datagridview that I have on my form, as you can see I fill dg from Sql Server, and it is sorted by first column in dg called DataInputID

this DataInputID is the same for multiple rows and I want to group them, being able to expand that group
I have looked on the google and found some solutions but was unable to implement them into my form, because most of those solutions are for asp.net

while I have simple basic windows form application that pulls data from Sql Server
Erik Rude 27-Jul-12 9:29am    
Ok - put this code sample and explanation into your original question (using the improve question option) then you'll probably get some great answers.

I found this

http://stackoverflow.com/questions/3530036/grouping-datagridview-in-c-sharp-winforms

Indication that it may be an uphill struggle..

Maybe have a look at this article:
http://www.codeproject.com/Articles/14388/OutlookGrid-grouping-and-arranging-items-in-Outloo

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900