VB.net Datagrid Parent Row

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

I am using a parent child relationship in the data grid (VB.net). I use
column styles and set the width on my columns to 0 to hide the ID
fields that I want access too but don't need the user to see. The
problem is when the user drills down to the child the data grid's
parent row label lists all of the parent rows columns and values
including the ones that were hidden. Is there a way programmatically to
change this so that only the data I want shown from the parent is
listed in the parent row label?
 
Hi,

Add a tablestyle to your datagrid.

http://msdn.microsoft.com/library/d...ry/en-us/dnwinforms/html/wnf_custdatagrid.asp

http://msdn.microsoft.com/library/d...tingwindowsformsdatagridvisualbasicprimer.asp

Ken
---------------------
I am using a parent child relationship in the data grid (VB.net). I use
column styles and set the width on my columns to 0 to hide the ID
fields that I want access too but don't need the user to see. The
problem is when the user drills down to the child the data grid's
parent row label lists all of the parent rows columns and values
including the ones that were hidden. Is there a way programmatically to
change this so that only the data I want shown from the parent is
listed in the parent row label?
 
Thanks Ken but I already have tables styles. I probably should have
added that when I said that I use column styles to set the ID columns
invisible to the user. I have two table styles one for the child table
and one for the parent. The problem is not that the ID fields are being
shown in the Parent table, when it is visible in the grid. The problem
is that when the user drills down to the child table the grids parent
row label is listing all columns including the ID fields which I don't
want to show. Now I know I can hide the row by setting the
parentrowsvisible property. This is however not the desired outcome.
What I would like to do is be able to chose which fields are listed in
this row. Is that possible?
 
Back
Top