Get images row wise in datagridview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bharathi228
    New Member
    • Jul 2008
    • 28

    Get images row wise in datagridview

    i want display images row wise using datagridview in windowsapplicat ion.

    in asp datalist control is used but windows any control is there .

    pls any one response to me urgently
  • aryanbs
    New Member
    • Mar 2009
    • 42

    #2
    You can use RowPostPaint event


    Code:
        Private Sub DataGridView1_RowPostPaint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewRowPostPaintEventArgs) Handles DataGridView1.RowPostPaint
            Dim rowBounds As New Rectangle(Me.DataGridView1.RowHeadersWidth, _
           e.RowBounds.Top, Me.DataGridView1.Columns.GetColumnsWidth( _
           DataGridViewElementStates.Visible) - _
           Me.DataGridView1.HorizontalScrollingOffset + 1, e.RowBounds.Height)
    
            If e.RowIndex = 0 Then
                e.Graphics.DrawImage(Image.FromFile("c:\backup\test.jpg"), rowBounds)
            End If
        End Sub

    Comment

    Working...