Wrox Programmer Forums
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2007, 03:22 AM
Registered User
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGridView

Hi,

I want know how to adjust the order of datagridview's columns at run time. since when i bound the grid with data source it randomly sort the columns but i want them like the table in the database.

Thanks in advance.

Wassim

 
Old January 9th, 2007, 12:06 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Add the sort criteria to the query that retrieves the data. Or you can specify a sort value in the DefaultView of the dataset table if you are using a dataset.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
datagridview help manius VB Databases Basics 1 January 27th, 2008 02:44 AM
DatagridView in C# velan C# 2005 0 June 8th, 2007 09:25 PM
datagridview thirumalai ASP.NET 1.0 and 1.1 Professional 1 April 7th, 2007 03:35 AM
DataGridView akumarp2p C# 2005 1 December 30th, 2006 12:40 PM
datagridview ScottSheck Visual Basic 2005 Basics 0 June 14th, 2006 11:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.