Click here to Skip to main content
15,909,898 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: hi Pin
DanB19833-Oct-07 11:06
DanB19833-Oct-07 11:06 
GeneralRe: hi Pin
GuyThiebaut3-Oct-07 11:09
professionalGuyThiebaut3-Oct-07 11:09 
AnswerRe: hi Pin
Christian Graus3-Oct-07 12:33
protectorChristian Graus3-Oct-07 12:33 
QuestionPassing a variable to another form Pin
Zaegra3-Oct-07 4:05
Zaegra3-Oct-07 4:05 
AnswerRe: Passing a variable to another form [modified] Pin
Kenny McKee3-Oct-07 4:19
Kenny McKee3-Oct-07 4:19 
AnswerRe: Passing a variable to another form Pin
Johan Hakkesteegt3-Oct-07 4:57
Johan Hakkesteegt3-Oct-07 4:57 
QuestionDatatable sort Pin
cstrader2323-Oct-07 3:38
cstrader2323-Oct-07 3:38 
AnswerRe: Datatable sort Pin
Dave Kreskowiak3-Oct-07 4:53
mveDave Kreskowiak3-Oct-07 4:53 
cstrader232 wrote:
ChartDataTable.Select("Datevalue > 0", "Datevalue")


Because the Select method returns an array of DataRow object, which your code completly ignored. It does not make any changes to the existing DataTable.

You can get rid of the AcceptChanges line, it doesn't do anything here.


cstrader232 wrote:
This code then prints the data in the unsorted order:


Like I said, you completely ignored, and dropped, the array of DataRow objects returned by the Select method. You're looking for something more like:
Dim sortedRows() As DataRow = ChartDataTable.Select("Datevalue > 0", "Datevalue DESC")
 
For Each dr As DataRow In sortedRows
    Console.WriteLine(dr.Item("DateValue"))
Next



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: Datatable sort Pin
cstrader2323-Oct-07 8:53
cstrader2323-Oct-07 8:53 
GeneralRe: Datatable sort Pin
Dave Kreskowiak3-Oct-07 12:02
mveDave Kreskowiak3-Oct-07 12:02 
GeneralRe: Datatable sort Pin
cstrader2323-Oct-07 12:33
cstrader2323-Oct-07 12:33 
QuestionInitialize Date and time picker Vb 2005 Pin
nishkarsh_k3-Oct-07 2:46
nishkarsh_k3-Oct-07 2:46 
AnswerRe: Initialize Date and time picker Vb 2005 Pin
Johan Hakkesteegt3-Oct-07 8:00
Johan Hakkesteegt3-Oct-07 8:00 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
nishkarsh_k3-Oct-07 8:22
nishkarsh_k3-Oct-07 8:22 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
TremaHD3-Oct-07 12:05
TremaHD3-Oct-07 12:05 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
Johan Hakkesteegt3-Oct-07 19:49
Johan Hakkesteegt3-Oct-07 19:49 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
nishkarsh_k3-Oct-07 20:18
nishkarsh_k3-Oct-07 20:18 
GeneralRe: Initialize Date and time picker Vb 2005 Pin
Johan Hakkesteegt3-Oct-07 20:38
Johan Hakkesteegt3-Oct-07 20:38 
AnswerRe: Initialize Date and time picker Vb 2005 Pin
visualhint4-Oct-07 3:48
visualhint4-Oct-07 3:48 
QuestionHai give an idea Pin
Senthil S3-Oct-07 2:11
Senthil S3-Oct-07 2:11 
AnswerRe: Hai give an idea Pin
Colin Angus Mackay3-Oct-07 3:16
Colin Angus Mackay3-Oct-07 3:16 
AnswerRe: Hai give an idea Pin
Scott Dorman3-Oct-07 12:12
professionalScott Dorman3-Oct-07 12:12 
AnswerRe: Hai give an idea Pin
koolprasad20034-Oct-07 1:00
professionalkoolprasad20034-Oct-07 1:00 
QuestionHow to bind a picture to a picturebox at run time in Vb.Net..? Pin
Balagurunathan S3-Oct-07 1:36
Balagurunathan S3-Oct-07 1:36 
AnswerRe: How to bind a picture to a picturebox at run time in Vb.Net..? Pin
C1AllenS3-Oct-07 2:04
C1AllenS3-Oct-07 2:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.