Serialcoder en Français Serialcoder in English
TEL : +33 (0)9 72 13 15 17

Windows Forms FAQ resources

5. Windows Forms Datagrid

5.77 I have a derived DataGridColumnStyle. From within my Paint override, how can I get at other values in the DataGrid?


You can get a referernce to the DataGrid with code such as:


Dim grid As DataGrid = Me.DataGridTableStyle.DataGrid

Once you have the grid, you can use an indexer to get the value of any particular column on the same row.


Dim someValue as Object = grid(rowNum, 5) ' value in column 5....