Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid Formatting 1

Status
Not open for further replies.

Draug

Programmer
Apr 18, 2001
77
0
0
CA
Greetings,

I am new to VB, but have managed to slog my way through the formatting of a datagrid, mostly due to the information I have captured from many posts in this forum. Let me express my thanks to all those that offer words of wisdom here.

I have my Grid looking pretty much how I would like it to, except for one thing. Is there a way to remove the built in Record Selector that occupies the left most column? If it cant be removed, can it be reduced in size?

It is not needed for what I am doing. I am basically using the DataGrid as a multi field Listbox (I dont think you can have more than one field in those, and if you can, I have wasted most of my day). Since my grid functions as a listbox, you can see why the record selector itself is not needed.

Thanks for any advice,
Draug
 
Try the RowHeadersVisible property.
Also, have you looked at the listview control?

Durkin
 
Thanks Durkin.

I too thought the RowHeadersVisible Property would hide that record selector, but it did not.

As far as looking at the Listview, I just read up on it after you mentioned it, and it does seem to do what I had set out to do.

Can you update a dataset with a ListView?

Draug
 
Hmm..
The rowheadersvisible property gets rid off the recordselector for me so I'm not sure what's going on on your computer. I'm using version 1.0 of the framework. Maybe you're using 1.1?
As to the listview, I'm pretty sure you can't edit rows in it like a datagrid so if you need that functionality I would stick with that.

Durkin
 
Yes, you guessed it, I am using version 1.1. I had to update it because there was an issue with 1.0, in conjunction with XP Pro, that would not allow the server that a Webservice was running from to be found.

That is pretty brutal that it works to hide that row header in 1.0, and not in 1.1 Guess I am stuck with them for now... :(

Thanks again,
Draug
 
Good News!

It is only the design time setting of that RowHeadersVisible property that does not work. I can successfully hide it if it is done in the code, as follows:

Dim TableStyle As New DataGridTableStyle()
dsOwner.TableStyles.Add(TableStyle)
TableStyle.RowHeadersVisible = False

Just thought I would share that with you folks.
Draug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top