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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to force format without defining columns

Thread ID:





6868 Sep 2,2003 12:46 PM UTC Sep 2,2003 01:58 PM UTC WinForms 1
Tags: GridControl
Francois Rioux
Asked On September 2, 2003 12:46 PM UTC

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 01:58 PM UTC

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.


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