Solved

DataGrid Sort

Posted on 2009-07-13
2
332 Views
Last Modified: 2012-05-07
I have a datagrid with many rows. Need to sort all the rows of the grid except the first row. I'm using the Sort method of the datagrid.

How to sort all the rows of the datagrid except the first row?
Please help me....
Thanks in advance
dgvReport.Sort(dgvReport.Columns[2], ListSortDirection.Ascending);

Open in new window

0
Comment
Question by:nandithaa
2 Comments
 
LVL 1

Accepted Solution

by:
evidica earned 50 total points
ID: 24842598
you could remove the row by storing it in a DataGridRow Object then remove it from the DataGrid, sort it, then insert the DataGridRow back in at 0.
0
 
LVL 6

Author Comment

by:nandithaa
ID: 24846755
Thanks a lot it worked
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question