Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Sort Datagrid in any Column using 1 line of Code
Author:
Kenneth Linch
Website:
http://visualbasic-source-code.com
Submitted:
5/10/2010
Version:
VB6
Compatibility:
VB6
Category:
Controls
Views:
19555
This code will sort the datagrid in ascending order. This is so simple and easy to use and better benefits, just 1 line of code you can sort any column.
Declarations:
'none
Code:
'Best code in sorting the visual basic 6 datagrid. 'ColIndex will determine which column to sort in ascending order Private Sub Datagrid1_HeadClick(ByVal ColIndex As Integer) Adodc1.Recordset.Sort = DataGrid1.Columns(ColIndex).DataField End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement