Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > BiDirectional Sorting

Reply
Thread Tools

BiDirectional Sorting

 
 
Sean
Guest
Posts: n/a
 
      02-05-2004
Hi,

I have a datagrid, which gets populated using a Stored Procedure

I am using the standard sort comman
Sub dg_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEvent Args) Handles dgPriceList.SortComman
Tr
BindData(e.SortExpression
Catch ex As Exceptio
lberror.Text = ex.Message & "<br>" & ex.Source & "<br>" & ex.StackTrac
End Tr
End Su

The regular sort works perfectly, is there a way i can get to do a bi-directional sor

I did go thru' the list and there was a link (http://www.v4cnet.com/) and also an snippet of code, but it was not able to recognize the e.sortexpression.tostring() + "Desc

if(SortExpression==e.SortExpression.ToString()) //Change the sort order to DES

SortExpression = e.SortExpression.ToString() +" DESC"

else //Change the sort order to AS

SortExpression = e.SortExpression.ToString()

tr

//Bind the Grid Dat
BindGridData()

catch(Exception ex

throw ex


So, what i would like to know, if there is someway, i could get a bi-directional sort

Thank yo

 
Reply With Quote
 
 
 
 
Scott
Guest
Posts: n/a
 
      02-06-2004
Sean, check out this article:
http://aspnet.4guysfromrolla.com/articles/012903-1.aspx

It discusses how to implement bidirectional DataGrid sorting. There
is a live demo available at:
http://aspnet.4guysfromrolla.com/demos/dgExample27.aspx

"Sean" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Hi,
>
> I have a datagrid, which gets populated using a Stored Procedure.
>
> I am using the standard sort command
> Sub dg_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEvent Args) Handles dgPriceList.SortCommand
> Try
> BindData(e.SortExpression)
> Catch ex As Exception
> lberror.Text = ex.Message & "<br>" & ex.Source & "<br>" & ex.StackTrace
> End Try
> End Sub
>
> The regular sort works perfectly, is there a way i can get to do a bi-directional sort
>
> I did go thru' the list and there was a link (http://www.v4cnet.com/) and also an snippet of code, but it was not able to recognize the e.sortexpression.tostring() + "Desc"
>
> if(SortExpression==e.SortExpression.ToString()) //Change the sort order to DESC
> {
> SortExpression = e.SortExpression.ToString() +" DESC";
> }
> else //Change the sort order to ASC
> {
> SortExpression = e.SortExpression.ToString();
> }
> try
> {
> //Bind the Grid Data
> BindGridData();
> }
> catch(Exception ex)
> {
> throw ex;
> }
>
>
> So, what i would like to know, if there is someway, i could get a bi-directional sort.
>
> Thank you

 
Reply With Quote
 
 
 
 
Sean
Guest
Posts: n/a
 
      02-10-2004
Thank You.

The article and example, helped in directing me in the right path


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bidirectional connection between two bidirectional ports Manfred Balik VHDL 12 09-10-2006 08:53 PM
datagrid bidirectional sorting mark ASP .Net 4 06-15-2004 06:06 PM
DataGrid Sorting - bidirectional Snig ASP .Net Datagrid Control 2 01-05-2004 03:45 PM
DataGrid Sorting - bidirectional Snig ASP .Net 2 11-27-2003 05:44 PM
Re: A component for bidirectional sorting of a datagrid? John Saunders ASP .Net 1 08-12-2003 07:31 AM



Advertisments