Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>1). Try out MSDN's Mark Ridout's <a href="http://blogs.msdn.com/b/markrideout/archive/2006/01/18/new-link-for-treegridview.aspx" rel="nofollow noreferrer">TreeGridView</a> and read his <a href="http://blogs.msdn.com/b/markrideout/archive/2006/01/08/customizing-the-datagridview-to-support-expanding-collapsing-ala-treegridview.aspx" rel="nofollow noreferrer">article</a> on using it.</p> <p><img src="https://i.stack.imgur.com/AMTtF.jpg" alt="enter image description here"></p> <p>Also see if this <a href="http://www.codeproject.com/Articles/28276/DataGridView-with-hierarchical-data-binding" rel="nofollow noreferrer">CodeProject DataGridView with Hierarchical Data Binding</a> that uses Mark Ridout's TreeGridView is useful.</p> <p>2). If free controls dont work out have a look at 3rd parties (I am not affiliated with these co's):</p> <p><a href="http://www.devexpress.com/Products/NET/Controls/WinForms/Grid/data.xml" rel="nofollow noreferrer">Devexpress XtraGrid</a><br> <a href="http://www.telerik.com/products/winforms/gridview.aspx" rel="nofollow noreferrer">Telerik Gridview</a><br> <a href="http://www.infragistics.com/products/windows-forms/grid/" rel="nofollow noreferrer">Infragistics Grid</a><br> <a href="http://visualstudiogallery.msdn.microsoft.com/5f0d8caa-3587-44d9-9491-5fb3d5b6b8d0" rel="nofollow noreferrer">VIBlend DataGridView for WinForms</a><br> <a href="http://www.janusys.com/janus/library/CustomPages/gridexnet.htm" rel="nofollow noreferrer">Janus Grid</a><br> <a href="http://xceed.com/Grid_WinForms_Intro.html" rel="nofollow noreferrer">xceed's Grid</a></p> <hr> <p>3). I'm pretty sure adding a TablePanelLayout into a Grids cell is <strong>not</strong> what you want, here is the code so you can see how dodgy it is for yourself:</p> <pre><code>DataTable dt = new DataTable(); dt.Columns.Add("name"); for (int j = 0; j &lt; 10; j++) { dt.Rows.Add(""); } this.dataGridView1.DataSource = dt; this.dataGridView1.Columns[0].Width = 200; //add tableLayoutPanel1 into the control collection of the DataGridView this.dataGridView1.Controls.Add(tableLayoutPanel1); //resize the row this.dataGridView1.Rows[1].Height = 100; //set its location and size to fit the cell tableLayoutPanel1.Location = this.dataGridView1.GetCellDisplayRectangle(0,1, true).Location; tableLayoutPanel1.Size = this.dataGridView1.GetCellDisplayRectangle(0, 1, true).Size; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload