Cannot set DataGrid RowHeaderWidth to less than 30

G

Guest

I have seen this question asked elsewhere, but have never found an answer.
I'm adding a form to my app that has two datagrids - master and detail. The
dataset consists of two tables and a relation between them - parent and child
tables. One datagrid is bound to the parent table and the other to the
relation as follows:

this.grid1.DataSource = this.dataset;
this.grid1.DataMember = "Parent";
this.grid2.DataSource = this.dataset;
this.grid2.DataMember = "Parent.Relation";

This works correctly, except when setting the RowHeaderWidth of grid1 in the
designer to be 20, it resets back to 30. I even tried setting it the form
constructor but it doesn't have any effect. It appears that this is because
the grid is bound to a table that is the parent table of a relation and it
may need to display links to the relation and child table. But I have set
ParentRowsLabelStyle to None and ParentRowsVisible to false, but it still
doesn't set to anything under 30. On the second grid there is no problem
setting RowHeaderWidth to 20.

Any ideas how I can get around this. All the other grids in the app have
RowHeaderWidth of 20 and I want to keep the same style on this grid.

Thanks,
Scott
 
G

Guest

My last post was not using a recognised address for the managed newsgroups.
Hoping for a response from the MSFT support team.
Scott.
 
G

Guest

Changed my profile as well - should get recognised by MSFT managed newsgroup
support team this time !
Scott.
 

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