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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

set the width of col in GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

43439 Apr 24,2006 08:18 AM UTC Apr 24,2006 09:13 AM UTC WinForms 2
loading
Tags: GridControl
Fady Sayegh
Asked On April 24, 2006 08:18 AM UTC

hi to all, i''m working on a GridDataBoundGrid control, how can i align the text of a column, to the left, right or center in my GridDataBoundGrid control. best regards and thanks in advance fady

Administrator [Syncfusion]
Replied On April 24, 2006 09:03 AM UTC

Hi Fady, By default, DataBoundGrid doesn''''''''t store any style info properties.You can not set any cell or row specific properties for the DataBoundGrid.You need to provide them on demand in the Model.QueryCellInfo as shown in this KB: http://www.syncfusion.com/Support/article.aspx?id=10351 If you are planning to set any visual style info properties, you need to use the PrepareViewStyleinfo, http://www.syncfusion.com/Support/article.aspx?id=560 Could you try this code in PrepareViewStyle Info Event to set the texe Alignment of the Column header.Here is a code snippet //For ColumnHeader cell(0,,1) if(e.RowIndex == 0 && e.ColIndex ==1) { e.Style.HorizontalAlignment = GridHorizontalAlignment.Left; } Please let me know if you need any further assistance. Thanks for choosing Syncfusion Products. Regards, Haneef

Fady Sayegh
Replied On April 24, 2006 09:13 AM UTC

Hi Haneef, thanks to your reply, it works fady

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

;