Re: typed DataSet-bound DataGrid sorting

From: Whugster (whug_at_nothing.com)
Date: 06/29/04


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"
>>
>>
>>
>
>



Relevant Pages

  • Re: I really hate .NET especially inside Delphi
    ... Consume a webservice that exposes a typed dataset. ... But now try to drop it on a form - VCL or Winform. ... Winforms has the designers for binding to datasets. ... But you cant ...
    (borland.public.delphi.non-technical)
  • Re: Dual Combo box binding problem (relation involved)
    ... I understand that when you bind comboboxes to data ... this might be caused by incorrect binding of data. ... Because when using typed DataSet, ... we can ensure that correct schema has been created, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: accessing fields in typed dataset
    ... I'm using a BindingManagerBase and binding context with the ... .AddNew() (which is supposed to automatically create new row on datatable ... 'NewXXXXTableRow' property of the typed dataset to get a handle to the new ... but any assignments I try to do on columns there give me Invalid Casts ...
    (microsoft.public.dotnet.framework.adonet)

Quantcast