Re: what's the best way
- From: "John 3:16" <bobmcc@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 23 Jan 2006 10:09:41 -0500
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....
>>
>>
>
>
.
- References:
- what's the best way
- From: John 3:16
- Re: what's the best way
- From: Steve Mauldin
- what's the best way
- Prev by Date: Re: what's the best way
- Next by Date: Re: Migration to 2.0: Codebehind file must exist?
- Previous by thread: Re: what's the best way
- Next by thread: Re: what's the best way
- Index(es):
Relevant Pages
|