Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Sorting a DataTable


Message #1 by "Michael Gaertner" <mgaert@b...> on Mon, 22 Jan 2001 16:17:47 -0000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; 
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 
5.5.2650.12">
<TITLE>RE: aspx_professional digest: January 22, 2001</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi,</FONT>
<BR><FONT SIZE=3D2>Here is what the SDK help gives as example for the 
"sort" method of the DataView object:</FONT>
</P>

<P><FONT SIZE=3D2>Private Sub SortByTwoColumns()</FONT>
<BR><FONT SIZE=3D2>   ' Get the DefaultView of a 
DataSet.</FONT>
<BR><FONT SIZE=3D2>   Dim myDataView As DataView</FONT>
<BR><FONT SIZE=3D2>   myDataView =3D 
DataSet1.DefaultView</FONT>
<BR><FONT SIZE=3D2>   ' By default, the first column sorted 
ascending.</FONT>
<BR><FONT SIZE=3D2>   myDataView.Sort =3D "State, 
ZipCode DESC"</FONT>
<BR><FONT SIZE=3D2>End Sub</FONT>
</P>

<P><FONT SIZE=3D2>I've tried and it works.</FONT>
</P>

<P><FONT SIZE=3D2>| Mathieu Clerte </FONT>
<BR><FONT SIZE=3D2>| DBA & Development , MCP </FONT>
<BR><FONT SIZE=3D2>| E-mail: mathieuc@i...</FONT>
</P>

<P><FONT SIZE=3D2>| Statistics Institute of French Polynesia 
(ISPF)</FONT>
<BR><FONT SIZE=3D2>| mail: BP 395 Papeete - Tahiti  -  French 
Polynesia  98713</FONT>
<BR><FONT SIZE=3D2>| tel: (689) 543 232 </FONT>
<BR><FONT SIZE=3D2>| fax: (689) 427 252 </FONT>
<BR><FONT SIZE=3D2>| email: ispf@i... </FONT>
<BR><FONT SIZE=3D2>| web: <<A HREF=3D"http://www.ispf.pf" 
TARGET=3D"_blank">http://www.ispf.pf</A>> </FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT SIZE=3D2>-----Message d'origine-----</FONT>
<BR><FONT SIZE=3D2>De : ASP_Professional digest [<A 
HREF=3D"mailto:aspx_professional@p...">mailto:aspx_professional@
p2p.wrox.com</A>]</FONT>
<BR><FONT SIZE=3D2>Envoy=E9 : lundi 22 janvier 2001 22:00</FONT>
<BR><FONT SIZE=3D2>=C0 : aspx_professional digest recipients</FONT>
<BR><FONT SIZE=3D2>Objet : aspx_professional digest: January 22, 
2001</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>ASPX_PROFESSIONAL Digest for Monday, January 22, 
2001.</FONT>
</P>

<P><FONT SIZE=3D2>1. Sorting a DataTable</FONT>
</P>

<P><FONT 
SIZE=3D2>---------------------------------------------------------------
-------</FONT>
</P>

<P><FONT SIZE=3D2>Subject: Sorting a DataTable</FONT>
<BR><FONT SIZE=3D2>From: "Michael Gaertner" 
<mgaert@b...></FONT>
<BR><FONT SIZE=3D2>Date: Mon, 22 Jan 2001 16:17:47 -0000</FONT>
<BR><FONT SIZE=3D2>X-Message-Number: 1</FONT>
</P>

<P><FONT SIZE=3D2>I need a RowsCollection to output data from SQL 
Server. Currently, I sort</FONT>
<BR><FONT SIZE=3D2>in stored procedure, but I would like to sort in my 
web app. I know a</FONT>
<BR><FONT SIZE=3D2>DataView can be sorted, and that I can get a 
DataView from a DataSet. I</FONT>
<BR><FONT SIZE=3D2>can't seem to get a RowsCollection from a sorted 
DataView. I have tried to</FONT>
<BR><FONT SIZE=3D2>AppendChanges() to the source table of my DataView 
to no avail.</FONT>
</P>

<P><FONT SIZE=3D2>Any thoughts?</FONT>
</P>

<P><FONT SIZE=3D2>Thanks.</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>---</FONT>
</P>

<P><FONT SIZE=3D2>END OF DIGEST</FONT>
</P>

<P><FONT SIZE=3D2>---</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://www.asptoday.com" 
TARGET=3D"_blank">http://www.asptoday.com</A> - the leading site for 
timely,</FONT>
<BR><FONT SIZE=3D2>in-depth information for ASP developers 
everywhere.</FONT>
<BR><FONT SIZE=3D2>---</FONT>
<BR><FONT SIZE=3D2>You are currently subscribed to aspx_professional 
as: clertem@i...</FONT>
<BR><FONT SIZE=3D2>
$subst('Email.Unsub')</FONT>
</P>

</BODY>
</HTML>

  Return to Index