Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

keep formatting when grouped columns

$
0
0

Hi Guys

My code below group to datagridview columns in one and I need to keep the font and color of the second column inside the first column. cause right now the second column inherited first column cell formatting. any idea on how to do this ? thank you

For Each r As DataGridViewRow In Me.DataGridView1.Rows
            If Not r.Index = Me.DataGridView1.NewRowIndex Then
                r.Cells(2).Value = r.Cells(2).Value.ToString & vbLf & r.Cells(3).Value.ToString
 End If
        Next
        Me.DataGridView1.AutoResizeRows()
        Me.DataGridView1.Columns(3).Visible = False



Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>