Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gridview Sort 'onsorting' question...

Status
Not open for further replies.

VisualGuy

Programmer
May 27, 2003
162
US
I'm trying to capture a sorting event and have it so that before it actually does the sort on the gridview, a textbox value on the page say's "one moment..."

The "one moment..." is listed within javascript on the actual page. However, I don't know how to talk to the page, prior to calling RunQuery, which handles the sort.

Any ideas...

Protected Sub GridView2_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) Handles GridView2.Sorting

If Not Me.Page.IsPostBack Then
Me.GridView2.Attributes.Add("OnSorting", "Sort_msg(this);")
End If

'Run Public Sub
RunQuery(SearchVal)
End Sub
 
when you mean talk to the page, do you mean html? if so you cannot. this is the nature of web development.
1. send request from client to server
2. server process request
3. send response from server back to client

each request/response is an atomic unit unaware of any other requests. to get an "interactive" fell to the webpage with status updates you need to use ajax. ajax still follows the pattern above, but it doesn't require the entire page to refresh to update information.

there are many javascript libraries out there that do the heavy lifting of ajax for you. jquery is the most popular, along with prototype, dojo, and ms ajax.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top