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.

DateTime field in GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

44505 May 25,2006 07:12 AM May 25,2006 08:06 AM Windows Forms 4
loading
Tags: GridControl
Nick Gardner
Asked On May 25, 2006 07:12 AM

Hi, I have a datatable with 2 columns of type DateTime. In the GDBGrid cells in those columns have a drop down arrow appear at the rightmost edge of the cell. How can I remove that arrow whilst still having the cell formatted as date time (so that sorting works correctly)? Thanks Nick

Administrator [Syncfusion]
Replied On May 25, 2006 07:15 AM

Hi Nick, Try this code to hide a DropDown button in a cell. Here is a code snippet. this.gridDataBoundGrid1.Binder.InternalColumns["ColumnName"].StyleInfo.ShowButtons = Syncfusion.Windows.Forms.Grid.GridShowButtons.Hide; Please let me know if this helps. Best Regards, Haneef

Nick Gardner
Replied On May 25, 2006 07:23 AM

Thats great. Do you know how I can get the cell to show the time as well as the date (the time is available in the underlying datatable)? Thanks Nick

Administrator [Syncfusion]
Replied On May 25, 2006 07:29 AM

Hi Nick, Colud you try this code to set the format of the a cell in a grid. Here is a code snippet. this.gridDataBoundGrid1.Binder.InternalColumns["Date"].StyleInfo.Format = "dd/mm/yyyy MM:hh"; Let me know if you have any further assistance. Regards, Haneef

Nick Gardner
Replied On May 25, 2006 08:06 AM

Super! Thanks.

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.

;