Hi all,
I've created on a web page a gridview
-----------------------------
<asp:GridView ID="Elenco" runat="server" AllowSorting="True"
AutoGenerateColumns="False" CssClass="Bordata" CellSpacing="2"
CellPadding="5">
<RowStyle CssClass="TabellaRiga" />
<Columns>
<asp:CommandField ButtonType="Image" EditImageUrl="~/risorse/
modifica.png" HeaderText="Modifica" ShowEditButton="True"/>
<asp:BoundField DataField="Id" HeaderText="Id" Visible="true"
ItemStyle-Width="10px" SortExpression ="Id" >
<ItemStyle Width="10px"></ItemStyle></asp:BoundField>
<asp:BoundField DataField="UserId" HeaderText="Utente" SortExpression
="UserId"/>
<asp:BoundField DataField="Cognome" HeaderText="Cognome"
SortExpression ="Cognome"/>
<asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression
="Nome"/>
<asp:BoundField DataField="eMail" HeaderText="E-Mail" SortExpression
="eMail"/>
<asp:TemplateField HeaderText="Elimina">
<ItemTemplate>
<asp:ImageButton ID="DeleteButton" ImageUrl="~/risorse/elimina.png"
CommandName="Delete" AlternateText="Cancella questo record"
OnClientClick="return confirm('Sei sicuro di voler cancellare questo
record?');" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="TabellaTitolo" HorizontalAlign="Center" />
<AlternatingRowStyle CssClass="TabellaRigaAlt" />
</asp:GridView>
-----------------------------
and here I populate this gridview
-----------------------------
Dim DS As DataSet
DS = Ser.getUtenti("U")
If Glb.checkDS(DS, Me.GetType.FullName, vErrDes, vErrSys) > 0 Then
Me.Elenco.DataSource = DS.Tables("Dati")
Me.Elenco.DataBind()
End If
DS = Nothing
Exit Sub
-------------------------------
now, the header labels appears like hyperlinks, but the sorting is not
working.
I guess is because of the DataBinding...
can anyone help me please ?