Sort DESC Asp

Asked

Viewed 41 times

2

I have a grid on my app. The code of a grid column is:

<Columns>
                        <asp:BoundColumn DataField="DATA_CADASTRO" SortExpression="DATA_CADASTRO"  HeaderText="Data Ativa&#231;&#227;o"
                            DataFormatString="{0:dd/MM/yyyy}">
                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:BoundColumn>

I would like to set the filter for that column with DESC, because the standard is already ASC.

How can I do that?

1 answer

2


In Datagrid, add AllowSorting="True", and in the column adds the DESC:

<asp:BoundColumn DataField="DATA_CADASTRO" SortExpression="DATA_CADASTRO DESC" HeaderText="Data Ativa&#231;&#227;o" DataFormatString="{0:dd/MM/yyyy}">

Browser other questions tagged

You are not signed in. Login or sign up in order to post.