Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid rows question

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
I'm using M$ DataGrid and this is a Windows desktop application.
I have some records (1000 or so) that I have sorted into categories, and I want the DataGrid to be able to collapse and expand the rows to show only the records of one type or another.

I added buttons to the DG, for collapsing the rows, but I can't get to the rows property to set them to 0.

And I'm not sure that's the way to go anyhow.

If anyone can please get me close on this, please let me know.
 
I only know the basics of the M$ Datagrid, but from what you are saying would ideally suit a Treeview and Grid together. The Tree would contain the summary, and clicking on the nodes would then display the contents of that node in the grid. It also helps to minimise how much data you ever need to display in the grid.


Sweep
...if it works dont mess with it
 
Thanks Sweep, but I thought of that too.
They want something like Outlook has with the plus and minus buttons.
I can use a 3rd party control, but I'd rather stay away from them and build it inhouse so I don't have to dist. another dll.

I wanted it to look something like this, but I don't want a grid within a grid because then every sub category will have it's own horz. scroll bar.


See, this one
Is no good for what I am looking for.

This is the look I am after:
 
Because what I have seen of master-detail, when you open the sub records, they look like individual grids and we want to have one grid.

Thanks for the replies. Please keep them coming.
 
I haven't looked at the code for this but from the description it looks as though you may be able to make a few modifications so that each "group" has an expand/collapse button:


--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
The datagrid is a Windows application and not an asp.net.

But thanks anyway.
 
Apologies...I keep forgetting which forum I'm in!

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Don't know if I get your comment right, but Master-Detail is also possible in one single datagrid.

The master records will have a plus sign in fornt.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top