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

Sorting in Rad Grid

1 Answer 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ritzie
Top achievements
Rank 1
Ritzie asked on 09 Jul 2009, 09:03 AM

Hello All,
              I have pasted y code where I want to sort the date ,But plz tell me if any property is to be added to sort the date in MM/DD/YYYY.


<

 

telerik:GridBoundColumn SortExpression ="Act_Dt" UniqueName ="Act_Dt" DataField ="Act_Dt" HeaderText="Activity Date" ShowSortIcon="false" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Font-Bold="true">

 

<

 

HeaderStyle HorizontalAlign="Left" ></HeaderStyle>

 

<

 

ItemStyle HorizontalAlign="Left" ></ItemStyle>

 

 

</telerik:GridBoundColumn>


Regards
Ritzie

 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 09 Jul 2009, 11:50 AM
Hello Ritzie,

In order to achieve the desired functionality I suggest you change your code as shown bellow:
ASPX:
<telerik:GridBoundColumn SortExpression="Act_Dt" DataFormatString="{0:MM/dd/yyyy}" 
                                UniqueName="Act_Dt" DataField="Act_Dt" HeaderText="Activity Date" ShowSortIcon="false" 
                                ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Font-Bold="true">  
                                <HeaderStyle HorizontalAlign="Left"></HeaderStyle> 
                                <ItemStyle HorizontalAlign="Left"></ItemStyle> 
                            </telerik:GridBoundColumn> 

For more information about column formatting, please refer to the following online demo:
Column Formatting

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Ritzie
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or