Setting column to invisble in datagridview - not always working - bug!

Setting column to invisble in datagridview - not always working - bug!

Post by Bob » Wed, 11 Jan 2006 00:23:27


I attached the properties list of the column in a datagridview. The
datagridview is bound. Note that the cell visible property is set to false
and while looking at the datagridview in the VS IDE the cell is not shown.
However when executing the program from within the IDE or the EXE directly,
the column showns up! The only way I found to hide it was to set its width
to 2 and set its autosize mode to none.

Is there a workaround for this bug other than what I did.

Any help would be appreciated.

Bob
 
 
 

1. DataGridView Column autosize mode not working?

2. finding last column not always working correctly


I have a macro to find a last column in all the worksheets in a workbook.
In some sheets it is correctly selecting the last column, but in some sheets
it is passing the last column and selecting some other column on way right to
it.
I tried to use the following two methods, both are working the same way.

Could someone figure out the correct way to find the last column?

Public Sub test()

Dim ws As Worksheet
Dim Lastrow, Lastcolumn As Long

On Error Resume Next

For Each ws In ActiveWorkbook.Worksheets

With ws

Lastrow = .Range("A" & Rows.Count).End(xlUp).Row
'Lastcolumn = ActiveCell.SpecialCells(xlCellTypeLastCell).Column
Lastcolumn = ActiveSheet.Cells(2, Columns.Count).End(xlToLeft).Column

.Cells(Lastrow, 1).Copy
.Range(.Cells(1, Lastcolumn + 1), .Cells(Lastrow, Lastcolumn +
1)).PasteSpecial Paste:=xlPasteAll, Transpose:=True

End With

Next ws
On Error GoTo 0

End Sub

3. asp2: setting UICulture via code does not work any more (always german Resources)?

4. [solved] asp2: setting UICulture via code does not work any more (always german Resources)?

5. DataGridView - refreshing calculated columns when move from column to column.

6. DataGridView bug with ComboBox column and AutoSizeColumnsMode

7. Group Policy for proxy setting does not always work

8. set column to NOT NULL not working

9. Datagridview column order bug

10. ADD-INS NOT WORKING IN XP WHICH WORK IN WIN 2000

11. Setting Image in DataGridView image column?

12. Setting RightToLeft property for columns in a DataGridView

13. DataGridView: Set value for columns having NULL value while updating database

14. How to set the column order in a DataGridView control

15. how to set the datagridview columns to allow user to click to sort