We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

image alignment

Thread ID:

Created:

Updated:

Platform:

Replies:

43191 Apr 18,2006 10:15 AM UTC Apr 19,2006 11:28 AM UTC Windows Forms 4
loading
Tags: GridControl
brijeshkhare
Asked On April 18, 2006 10:15 AM UTC

hi friends, i am displaying data in griddataboundgrid from datasourse and there is a boolean column in table but i am showing image through imagelist on every cell of that column but i am not able to set the alignment of that image. plz help

Administrator [Syncfusion]
Replied On April 18, 2006 02:55 PM UTC

Hi Brijesh, To set the Horizontal/Vertical alignment of the Image, you need to set the GridImageSizeMode to Normal. Below is a code snippet. style.ImageSizeMode =GridImageSizeMode.Normal; style.HorizontalAlignment = GridHorizontalAlignment.Right; style.VerticalAlignment = GridVerticalAlignment.Top; Regards, Calvin.

brijeshkhare
Replied On April 19, 2006 05:17 AM UTC

>hi friends, > >i am displaying data in griddataboundgrid >from datasourse and there is a boolean column in table but i am showing image through imagelist on every cell of that column but i am not able to set the alignment of that image. > > >plz help i have tried this property but it is not working when i use e.Style.CellType = "ImageCell" i am not able to set the aligment of image.

Administrator [Syncfusion]
Replied On April 19, 2006 09:34 AM UTC

Hi Brijesh, The CellType must be set to “Image” or GridCellTypeName.Image. Below is a code snippet that works fine for me. Let us know if you are trying something different. e.Style.CellType = "Image"; // GridCellTypeName.Image; e.Style.ImageList = this.imageList; e.Style.ImageSizeMode = GridImageSizeMode.Normal; e.Style.HorizontalAlignment = GridHorizontalAlignment.Right; e.Style.VerticalAlignment = GridVerticalAlignment.Top; Regards, Calvin.

brijeshkhare
Replied On April 19, 2006 11:28 AM UTC

>Hi Brijesh, > >The CellType must be set to “Image” or GridCellTypeName.Image. Below is a code snippet that works fine for me. Let us know if you are trying something different. > > e.Style.CellType = "Image"; // GridCellTypeName.Image; > e.Style.ImageList = this.imageList; > e.Style.ImageSizeMode = GridImageSizeMode.Normal; > e.Style.HorizontalAlignment = GridHorizontalAlignment.Right; > e.Style.VerticalAlignment = GridVerticalAlignment.Top; > >Regards, >Calvin. thanks Calvin now it is working fine

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;