Re: Expand/Collapse rows in datagrid?

OK, I guess after playing around with this, the row height shrinks to 3 which still leave it clickable

You could check to see if the CurrentRow.Height is > 3 and if so, set it to 3 else set it to 22 (or whatever height you start with).

You still end up with a row that looks like this:
Meaning you should probably do something with the background color so that it's apparent that it is a shrunken row. Plus it's not readily apparent that you can click that button in the row to open it back up.

Re: Expand/Collapse rows in datagrid?

Posted 08 October 2012 - 10:09 AM

Hello my friend, thanks for your reply...!!!

What i want to do is:
Assume i have a GridDataView with all the Clients.
I want for each client to add a button.
When the button is clicked i want to show for example all the information for that client.

Something like in a database:
If we click the triangle in the left side near the tables it shows all the tables of the database.

I am uploading a screenshot...!!!

I like what you show to me, but i want to show the button automatically for is row on page load.
And can you please give me some sample code?

There are also commercially available options. I've gotten the impression that the Infragistics controls is the pack leader, but one of the major advertisers for DIC is DevExpress, and they also offer a hierarchical data grid control.