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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

my datagrid won't sort

Status
Not open for further replies.

kisslogicgoodbye

Programmer
Mar 19, 2001
18
US
I have a datagrid. Allow Sorting is checked. My Column headings are links. WHen I click them, the page flickers as if it is refreshing data but the data sort does not change. Can anyone help?

This is the code:
Protected Sub DataGrid1_SortCommand(ByVal source As Object, _
ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) _
Handles DataGrid1.SortCommand
DataView1.Sort = e.SortExpression
DataGrid1.DataBind()
End Sub

This is my asp stuff:
<asp:datagrid id=DataGrid1 style=&quot;Z-INDEX: 101; LEFT: 21px; POSITION: absolute; TOP: 24px&quot; runat=&quot;server&quot; ForeColor=&quot;Black&quot; BorderColor=&quot;#999999&quot; BackColor=&quot;#CCCCCC&quot; AllowSorting=&quot;True&quot; OnSortCommand=&quot;DataGrid1_SortCommand&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top