Jane's Technical Stuff

Thursday, August 11, 2005

DataGridView, C#, RowHeadersVisible=false and combo boxes


Further to my last post there is a complication. In the current beta 2 framework, to get the combo boxes to work within the grid view without raising the exception "Getting the Size property of a cell in a shared row is not a valid operation." I've had to remove the RowHeadersVisible=false line.

Labels: ,

// posted by Jane @ 2:45 PM   save to del.icio.us

Comments:

Tuesday, August 02, 2005

DataGridView, C# and RowHeadersVisible=false


To make a DataGridView have deletes that work when setting
RowHeadersVisible = false;
it is necessary to set the SelectionMode for the DataGridView to be DataGridViewSelectionMode.FullRowSelect
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
This will then allow the Deletes to work as expected

Labels: ,

// posted by Jane @ 1:01 PM   save to del.icio.us

Comments:

Brighton Bloggers   This page is powered by Blogger. Isn't yours?   rss Sussex Digital - focusing on the Sussex digital community