GridView Sorting and paging Not working

G

Guest

For some reason my GridView is not sorting when you click on hyperlinks.
I assume it has something to do with the SQLDataSource but I don't know what.

Here is the code. (Notice I've removed the details of the SQL connection
because I didn't think it would be good to show those. Or that it would be
relavent for that matter.

<asp:GridView ID="GroupList" runat="server" AutoGenerateColumns="False"
AllowSorting="true" DataSourceID="SQLDataSource1"
AllowPaging="true" PageSize="25">
<PagerStyle HorizontalAlign="right" />
<PagerSettings Mode="NumericFirstLast"
Position="TopAndBottom"/>
<AlternatingRowStyle BackColor="#EEEEFF" />
<Columns>
<asp:TemplateField
SortExpression="GroupIdentificationCode" HeaderText="Group ID Code">
<ItemTemplate>
<a onclick="InsertGroupID('<%#
Eval("GroupIdentificationCode") %>')" style="cursor:hand;">
<%# Eval("GroupIdentificationCode") %>
</a>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Group Name"
SortExpression="GroupName" DataField="GroupName" ReadOnly="true"/>
<asp:BoundField HeaderText="User Name"
SortExpression="UserName" DataField="UserName" ReadOnly="true" />
<asp:BoundField HeaderText="Entry Date"
SortExpression="EntryDate" DataField="EntryDate" ReadOnly="true" />
</Columns>
</asp:GridView>

<asp:SqlDataSource ID="SQLDataSource1" runat="server"
SelectCommand="usp_Calligo_GroupEntries"
SelectCommandType="StoredProcedure"
ConnectionString="Data Source=;Initial Catalog=;User
ID=;Password="
DataSourceMode="DataSet"
ProviderName="System.Data.SqlClient" ConflictDetection="CompareAllValues"
EnableCaching="true">
</asp:SqlDataSource>

Does anyone see what is going on?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top