By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Datagrid BackGround Image

P: n/a
Anyone know if you can add a background image to a datagrid, there is a
property for colour but not for an image.

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
This should work, but does not. I am close. Any ideas?
Private Sub AddMyDataGrid()
' Create a button and add it to the form.
Dim dgrNewDataGrid As New DataGrid

' Anchor the datagrid to the left corner of the form
dgrNewDataGrid.Anchor = AnchorStyles.Left

' Assign a background image.
dgrNewDataGrid.BackgroundImage = Image.FromFile("C:\Documents and
Settings\Rachel D Kozlowski\My Documents\My Pictures\1.jpg")

' Make the datagrid the same size as the image.
dgrNewDataGrid.Size = dgrNewDataGrid.BackgroundImage.Size

' Add the datagrid to the form.
Me.Controls.Add(dgrNewDataGrid)
End Sub

"Michael Turner" wrote:
Anyone know if you can add a background image to a datagrid, there is a
property for colour but not for an image.

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.