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.

How to force format without defining columns

Thread ID:

Created:

Updated:

Platform:

Replies:

6868 Sep 2,2003 08:46 AM Sep 2,2003 09:58 AM Windows Forms 1
loading
Tags: GridControl
Francois Rioux
Asked On September 2, 2003 08:46 AM

Hi, I use a databound grid. In my context, the number of columns to be displayed in the grid is unknown and variable. However all column should be formatted ###.dd except the first column who's format is 'd'. How can I force the format I describe without using the DataBoundGridColumns? I changed the base style but it seems to be overriden by the default format for my data's datatype (double) which displays a lot of decimals.

Administrator [Syncfusion]
Replied On September 2, 2003 09:58 AM

Try this.grid.TableStyle.Format = "###.00"; this.grid.TableStyle.CellValueType = typeof(double); Then all cells in the grid should use this format and cellvaluetype unless you explicitly set a GridBoundColumn.StyleInfo or handle events like PrepareViewStyleInfo or Model.QueryCellInfo to set particular styles.

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.

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.

;