I'm confused.  What's with the ThingCollection?  I assume this isn't your actual 
code...

   FWIW, this is what I do to sort a datasource in VB:

myDV = mySet.Tables("BunchaDates").DefaultView
myDV.Sort = "Year"
myGrid.DataSource = myDV
myGrid.DataBind()

   It appears that your problem lies in the way the class passes the 
DataTable/DataView around.



Original Message:
>From: "Francesco" <[EMAIL PROTECTED]>

>Per this article...
>
>http://www.asp101.com/articles/stuart/dataview/default.asp
>
>I should be able to pass DataViews with different Sort orders to my
>repeater and get sorted tables, but it's not working for me.  Instead of
>sorting the view based on the DefaultView.Sort I specified (thingName),
>my repeater is just delivering the data sorted as it was initially
>loaded into the DataTable from SQL.  Why?
>
>
>in my MyThings class...
>----------------------------------------
>
>MyThings = new DataTable("Things");
>MyThings.Columns.Add("idThing", typeof(Int32));
>MyThings.Columns.Add("thingName", typeof(string));
>MyThings.Columns.Add("dateCreated", typeof(DateTime));
>MyThings.DefaultView.Sort = "thingName";
>
>public DataView Bind()
>{
>  return MyThings.DefaultView;
>}
>
>in my aspx.cs...
>----------------------------------------
>
>ThingCollection myThings = new ThingCollection(idMember);
>rpThings.DataSource = myThings.Bind();
>rpThingList.DataBind();
>




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to