Solved

How can I have my datagrid control sorted on one of the column when created.  Thanks.

Posted on 2007-03-30
2
208 Views
Last Modified: 2010-04-16
I'm using vs2005 and .net 2.0.  How can I have my datagrid control sorted on one of the column when created.  Thanks.
0
Comment
Question by:lapucca
2 Comments
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 500 total points
Comment Utility
depending on how u bind ur datagrid if u have sed datatable then u can do this

dataTable1.DefaultView.Sort = "ColUWantToSort";

then that would automatically reflect the datagrid
0
 

Author Comment

by:lapucca
Comment Utility
Thanks.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
network + 7 72
c# string 6 39
Unit testing, moq, best practices 7 28
Why is "packages element is not declared"? 2 31
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…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now