   [.net] Master/detail view using ONE DataGridView
  I'm reading "Professional C#, 2nd edition", the chapter about viewing data from sql databases in .net.They use a DataGrid control to display a simple relation between two tables in a database using the same DataGrid control. I use .net v2 and therefore the DataGridView control, and it just shows one of my tables without any relational information. MSDN has a topic/tutorial about how to show relational data in TWO DataGridView controls (changes in the master table affects the detail table grid), but not in the same one.Is it possible still, or do I have to roll back to the DataGrid control?Thanks   
  I think I have found a good solution for this problem.I used DataGridViewComboBoxColumn to display the datas of the detail Table. You can set the Displaystyle = DataGridViewComboBoxDisplaystyle.Nothing, so it appears like a normal text column.Here is an example code to do it this way:DataSet ds = MyDatabase.GetCategoriesAndProdukts();//Bind the griddataGridView1.DataSource = ds.Tables["Products"];//Remove the auto-generated CategoryID columndataGridView1.Columns.Remove("CategorieID");//Create the detail Column for CategorieIDDataGridViewComboBoxColumn detailCol = new DataGridViewComboBoxColumn();detailCol.HeaderText = "Category";//set the DisplayStyle to None, if you only want to have a lookup fielddgcb.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;dgcb.ReadOnly = true;//This column is bound to the Products.CategoryID fielddetailCol.DataPropertyName = "CategorieID";//The detail column is filled from the Categories tabledetailCol.DefaultCellStyle = ds.Tables["Categories"];detailCol.DisplayMember = "CategoryName";detailCol.ValueMember = "CategorieID";//Finally add the column to the griddataGridView1.Columns.Add(detailCol);Thats it.  GreetsDevJeff   ;  Wow glad i checked back here :) Thanks ill try that.   