how to display Expand Collapse rows in datagridview 2.0

Hello

I am using .net 2.0

In my windows application datagridview. I want to display the data in master and child relation ship. i.e displaying in the form of Expand & Collase mode.

This is straight forward in .NET 1.1 winforms DataGrid.

anybody anysounds
plz help how to do this usng VS 2005.




Answer this question

how to display Expand Collapse rows in datagridview 2.0

  • cvwilletts

    Take a look at this blogpost from Mark: Customizing the DataGridView to support expanding/collapsing.

    You will find the article and the source code.


  • Sudhir

    hi,

    i saw this question b4 , and the anwer was its not supported in datagridview just the datagrid, the good news is that you still can add datagrid to your form programmticly

    public Form1()

    {

    InitializeComponent();

    DataGrid dg = new DataGrid();

    dg.Location = new Point(10, 10);

    this.Controls.Add(dg);

    }

    or you can add it to the tool box by rightclick any tab in the toolbox and select choose item check and hightlight datagrid then hitok

    hope this helps



  • how to display Expand Collapse rows in datagridview 2.0