asp.net - Default column sorting from datagrid -
i have 5 bound columns retrieved database want on page load event retrieval of data should sorted according column only,
what need do..plz me!!
i'd recommend having data sorted database. presume have database query somewhere - either in asp.net page, in stored procedure, or in object model - need specify order by
clause.
for example, if have following sql statement used populate datagrid:
select col1, col2, col3, col4, col5 mytable
and want results sorted by, say, col3
, use following query instead:
select col1, col2, col3, col4, col5 mytable order col3
happy programming!
Comments
Post a Comment