This is a migrated thread and some comments may be shown as answers.

How Can I Show Just Date In A BoundColumn (Date Format In SQL Server 2008 Not DateTime) In My Grid

2 Answers 560 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Majid Darab
Top achievements
Rank 1
Majid Darab asked on 23 Jan 2010, 10:42 PM
hi my dear friends :
i have a grid with some boundColumn in it...
One Of My BoundColumn IS in Date Format In sql server 2008 (Not DateTime) and i want my rad grid show just date (without time) In this column Like In sql server 2008...
how can i do this ?
we just have system.datetime for this column not system.date or somethin like this ...

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Jan 2010, 06:19 AM
Hello Majid,

Set the DataFormatstring property of the GridBoundColumn as shown below in order to show Date part only.

ASPX:
 
<telerik:GridBoundColumn DataField="DOB" DataFormatString="{0:d}" HeaderText="DOB BoundColumn" SortExpression="DOB" UniqueName="DOB" 
    DataType="System.DateTime"
</telerik:GridBoundColumn> 

-Shinu.
0
Majid Darab
Top achievements
Rank 1
answered on 25 Jan 2010, 11:37 AM
really appreciate it
Tags
Grid
Asked by
Majid Darab
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Majid Darab
Top achievements
Rank 1
Share this question
or