Re: DataTable - order of rows.

From: Miha Markic [MVP C#] (miha)
Date: 12/05/04


Date: Sun, 5 Dec 2004 10:33:15 +0100

Hi Dobieslaw,

I think that Add will always append the row at the end and using a DataView
without sorting will reflect this.
However, to be on the safe side, you might consider using an AutoIncrement
field which will always be corrrectly incremented.

-- 
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com
"Dobieslaw Wroblewski" <dobieslaw.wroblewski@reverse_the_next.com.cegedim> 
wrote in message news:cosj9j$34s$1@atlantis.news.tpi.pl...
> Hello,
>
> I am adding rows to the data table without primary key defined using the
> DataRowCollection.Add(object[]) method.
>
> When I am reading the table directly or using its default view or a view
> with order set to "", I would like to process the records exactly in the
> order in which they were added.
>
> The question is whether I can trust the actual order of rows or it might 
> be
> implementation-dependent?
>
> DW.
>
> 


Relevant Pages

  • Re: How to sort a vector and then append data
    ... joel GUERRERO wrote: ... || Much more efficient than sorting. ... If there are repeated data, ...
    (comp.lang.fortran)
  • Re: How to sort a vector and then append data
    ... > || Much more efficient than sorting. ... If there are repeated data, ...
    (comp.lang.fortran)
  • Re: How to sort a vector and then append data
    ... >I need to sort a vector and then append the missing data that is: ... Much more efficient than sorting. ... Catherine Rees Lay ...
    (comp.lang.fortran)
  • Re: DataRow
    ... Are you sorting thru the dataview, if so that would be the reason since the ... > but the index does not change when the sorting order of hte rows change by ... >> Got tidbits? ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: Sorting a Dataview and Finding
    ... Thank You for you assistance but it did not work, ... I am sorting the Dataview on two columns, I believe this is why it is ... > Dim Namesas String ... > I have created a Dataview and have sorted it on the Date and ShiftNumber ...
    (microsoft.public.dotnet.languages.vb)