MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Styles > Image |
The image and its positioning in the cell are set using the styles. An image that has been set through cell styles, is displayed in front as compared to one displayed in an image cell. The styles can be used to set the image in cases where you want to display a common mark in other cell types as well. ImageCell is used when the image is displayed from data that is read from the data source, and other cases where the value is used as the image. To set an image using styles, you can use the CellStyle.Image and the CellStyle.ImageAlign properties. Whether the cell types support images using styles, can be determined for each of the Cell Types from their Styles.
Images can be set with the CellStyle.Image property.
This example sets the image.
GcMultiRow1.Rows(0).Cells(0).Style.Image = New Bitmap("test.png") |
gcMultiRow1.Rows[0].Cells[0].Style.Image = new Bitmap(@"test.png"); |
The image position can be set with the CellStyle.ImageAlign property.
This example sets the image postion.
Imports GrapeCity.Win.MultiRow GcMultiRow1.Rows(0).Cells(0).Style.ImageAlign = MultiRowContentAlignment.BottomCenter |
using GrapeCity.Win.MultiRow; gcMultiRow1.Rows[0].Cells[0].Style.ImageAlign = MultiRowContentAlignment.BottomCenter; |