Re: typed DataSet-bound DataGrid sorting
From: Whugster (whug_at_nothing.com)
Date: 06/29/04
- Next message: Scott G.: "Re: Web controls on multipage move around"
- Previous message: MattC: "Re: typed DataSet-bound DataGrid sorting"
- In reply to: MattC: "Re: typed DataSet-bound DataGrid sorting"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 29 Jun 2004 10:00:11 -0400
Yea that seems to be the problem because binding to a typed dataset happens
underneath. I just dragged and dropped a DataView object to the page and
bind from that object. The solved it. Thanks.
"MattC" <m@m.com> wrote in message
news:e8mOfAeXEHA.3988@tk2msftngp13.phx.gbl...
> I'm pretty sure you want binding to be the last thing that is done, i.e,
> have your dataset sorted then bind it to the grid for displaying.
>
> MattC
> "Whugster" <whug@nothing.com> wrote in message
> news:OJV1r8dXEHA.3668@TK2MSFTNGP09.phx.gbl...
>> Hi. I have a DataGrid bound to a typed DataSet and I just couldn't figure
>> out how to sort the damn thing. I tried setting the Sort property of the
>> DataTable.DefaultView and the Attributes["SortExpr"] of the DataGrid but
>> I
>> think the order of events matter. Here's a breakdown of events:
>>
>> 1. Page_Load:
>> - call my method LoadGrid( )
>> - call Page.DataBind( )
>>
>> 2. my method LoadGrid:
>> - set mytypeddataset = MethodThatGetsFilledDataSet( )
>>
>> 3. SortCommand grid event handler:
>> - mytypeddataset.Tables["MyTable"].DefaultView.Sort =
>> "somesortstring"
>>
>>
>>
>
>
- Next message: Scott G.: "Re: Web controls on multipage move around"
- Previous message: MattC: "Re: typed DataSet-bound DataGrid sorting"
- In reply to: MattC: "Re: typed DataSet-bound DataGrid sorting"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|