VB.net Datagrid Parent Row

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?
 
K

Ken Tucker [MVP]

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?
 
T

Timothy Whitbeck

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top