Scott...you NAILED it!
Two sets of form tags...what a rouse!!
Ok, so now I'm getting somewhere...it is now posting back...what's left is
handling the event of clicking on hyperlink to do the actual sort. The
example I'm working with gives me the code below, but I'm using a DataSet of
two tables from a stored procedure rather than a dataview. How would I
modify this to suit?
(Name of SqlDataAdapter DataSet is "DsAdvanced1". Tables are "table1" and
"table2". I need to bind and sort "table1".)
--START EXAMPLE CODE--
Private Sub DataGrid1_SortCommand(ByVal source As Object, _
ByVal e As System.Web.UI.WebControls.DataGridSortCommandEvent Args) _
Handles DataGrid1.SortCommand
DataView.Sort = e.SortExpression
DataGrid1.DataBind()
End Sub
--END EXAMPLE CODE--
"Scott Mitchell [MVP]" <> wrote in message
news:J7r%b.2880$ m...
> > I'm using IIS. Basically the hyperlinks don't do anything...clicking on
> it
> > yields "error on page" in the lower status bar whether it's the sorting
> > header or the paging 1-10 links.
>
> The error is a client-side JavaScript error, it sounds like. What if you
> click on that little error icon, what is the message it shows? What line
> number? Do a View/Source to see what line the problem is on.
>
> Just out of curiosity, are you using a User Control with a <form
> runat="server">...</form> in it?
>
> --
>
> Scott Mitchell
>
> http://www.4GuysFromRolla.com
> http://www.ASPFAQs.com
> http://www.ASPMessageboard.com
>
> * When you think ASP, think 4GuysFromRolla.com!
>
>
>
>
> > "Scott Mitchell [MVP]" <> wrote in message
> > news:Oup%b.2837$ ...
> > > > I have set up numerous datagrid controls and had a recurring problem
> > > with
> > > > the sorting and paging features. They simply don't work and
> generate
> > > and
> > > > "error on page" every time.
> > >
> > > What's the error message you get? Are you using Cassini as the Web
> > > server, or IIS? (I have noticed that with Cassini, at times,
> DataGrids
> > > with *large* ViewStates sometimes seem to muck up Cassini, resulting
> in a
> > > "No response from server" error in the browser.
> > >
> > > --
> > >
> > > <shameless plug>
> > > For more information on the DataGrid, DataList, and Repeater
> controls,
> > > consider picking up a copy of my latest book:
> > >
> > > ASP.NET Data Web Controls
> > >
> http://www.amazon.com/exec/obidos/AS...uysfromrollaco
> > > </shameless plug>
> > >
> > > Happy Programming!
> > >
> > > Scott Mitchell
> > >
> > > http://www.4GuysFromRolla.com
> > > http://www.ASPFAQs.com
> > > http://www.ASPMessageboard.com
> > >
> > > * When you think ASP, think 4GuysFromRolla.com!
> > >
> > >
> > >
> > >
> >
> >
>
>