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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Center aligning an Image in the Column

Thread ID:





15840 Jun 29,2004 06:03 AM UTC Jun 29,2004 06:24 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On June 29, 2004 06:03 AM UTC

Hi! I am using Image in the Grid column. The Image is aligned in the upper left portion of the Grid. I want it center aligned. I am setting Imagelist and ImageIndex property for GridStyleInfo. Is there a way I set a image to a column and the image shows center aligned in all the Cells for that column. Please Help...

Administrator [Syncfusion]
Replied On June 29, 2004 06:24 AM UTC

If you are using the 2.0 code base, you canuse teh "Image" celltype and set the ImageSizeMode to CenterImage. //for GridDataBoundGrid, get the style from GridBoundColumn.StyleInfo instead of grid.ColStyles GridStyleInfo style = this.gridControl1.ColStyles[2]; style.ImageIndex = 0; style.ImageList = list; style.CellType = "Image"; style.ImageSizeMode = GridImageSizeMode.CenterImage;


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon