Datagrid sort date column as string

M

mkhmer

Hi,

Anyone know how to handle date column sort in grid? it seem to be sorted as
string now that result below is shown:

1/1/2006
1/2/1980
2/4/1981

I did formate the column field using "{00:mm/dd/yyyy}" and original field in
table is also a date type too.

Appreciate your kindly help on this issue....
 
B

Bruno Alexandre

it doesn't matter the string format, because the grid will sort the data by
SortExpression

so all you need to do is add the SortExpression="yourDateField" to your item
template or boundfield
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top