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

DateTime datatype displays as date drop down by default

Thread ID:





2273 Dec 26,2002 06:58 PM UTC Dec 26,2002 07:38 PM UTC WinForms 1
Tags: GridControl
Charles Carlin
Asked On December 26, 2002 06:58 PM UTC

I have a SQL database and I am binding a grid dynamically to a number of different views/tables. All of the tables have a column called "last_update". This column is a datetime stamp. However the grid control automatically fills the column with a date picker drop down. How do I get this to just be a display of the date time coming from the database (it is not editable anyway). Code Snippet: grid.BeginUpdate(); grid.Text = sTable; dockingManager1.SetDockLabel(grid, sTable); grid.DataSource = dv; grid.Tag = nType.ToString(); grid.Model.ColWidths.ResizeToFit(GridRangeInfo.Row(0)); grid.Model.ColStyles["last_update"].CellType = "Static"; grid.Model.ColStyles["last_update"].CellValueType = typeof(DateTime); grid.Model.ColStyles["last_update"].Format = "s"; grid.Model.HideCols["id"] = true; grid.EndUpdate();

Administrator [Syncfusion]
Replied On December 26, 2002 07:38 PM UTC

You can turn off this default behavior by setting this property: grid.Binder.AutoInitCellTypes = False


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