Re: what's the best way

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks Steve.
I will work with your example and try to understand how this works.
Thanks again,
Bob.

"Steve Mauldin" <stevemauldin@xxxxxxxxxxx> wrote in message
news:u0mB%23wgHGHA.3752@xxxxxxxxxxxxxxxxxxxxxxx
> Bob,
>
> I concur with KJ the Dataview is the way to go. I am attaching some code
> you may find useful. This is from a report from one of my websites that
> uses dataview to sort on grid clicks. NationalConferencetable is a
> datatable that in my code is stored in the application object but you can
> get your datatable from just about any persistent storage area
> Application,
> Session, Cache, etc.. I hope this helps you.
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> ReportDataGrid.DataSource = Application ("NationalConferencetable")
>
> ReportDataGrid.DataBind()
>
> End Sub
>
> 'sorting code to use headers to sort data.
>
> Private Sub ReportDataGrid_SortCommand(ByVal source As System.Object,
> ByVal
> e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles
> ReportDataGrid.SortCommand
>
> Dim firstView As DataView = New DataView(Application
> ("NationalConferencetable"))
>
> firstView.Sort = e.SortExpression
>
> ReportDataGrid.DataSource = firstView
>
> ReportDataGrid.DataBind()
>
> End Sub
>
>
>
>
> "John 3:16" <bobmcc@xxxxxxxxxxxxxxxxxx> wrote in message
> news:u6p4wefHGHA.344@xxxxxxxxxxxxxxxxxxxxxxx
>> Hello...
>> I have a question related to performance.
>> Being new to asp.net & vp programming, I put together
>> a webform that displays columns of data in a datagrid.
>> Users can sort by the header label.
>>
>> QUESTION: When they click to sort, I run a new
>> stored procedure to return the resorted data...
>>
>> Should I only get the data once and query the
>> disconnected dataset.. and if so .. can someone
>> point me in the right direction.
>>
>> Thanks in advance....
>>
>>
>
>


.



Relevant Pages

  • Re: whats the best way
    ... I concur with KJ the Dataview is the way to go. ... 'sorting code to use headers to sort data. ... Private Sub ReportDataGrid_SortCommand(ByVal source As System.Object, ... Dim firstView As DataView = New DataView(Application ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Wrong Index after a datagrid is sorted -- Help!
    ... Dont sort the dataview, and Check how you are obtaining the dataview. ... Get the Currency manager for datagrid.. ... > Private Sub DataGrid1_SortCommand(ByVal source As Object, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Sort DataView according to Integer
    ... Private Sub Button1_Click(ByVal sender As System.Object, ... > So I have a listBox whose datasource is a DataView. ... > The big problem is that DataView seems to convert this sequenceNumber into a string before using it to sort the> DataView. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Wrong Index after a datagrid is sorted -- Help!
    ... DataGrid then pulls data from a dataview whose source is the dataset. ... However, if I sort the ... Private Sub DataGrid1_SortCommand(ByVal source As Object, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: VarPtr and passing variables by ref
    ... group who I can personally vouch for has many, ... First is was Bob, which was a foolish thing to do because he knows his ... web presense which Bob and Mike don't...and this makes them targets for your ... |> Private Sub Test ...
    (microsoft.public.vb.general.discussion)