Bonjour à tous

j'ai une gridview que je la remplis à partir de ma BDD
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
 <asp:GridView ID="GridView3" runat="server" Font-Names="Calibri" Font-Size="12pt"
                        Height="171px" Style="position: absolute; left: 0px; top: 0px;" Width="780px" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" allowsorting="True">
                        <SelectedRowStyle ForeColor="Black" BackColor="LightSkyBlue" Font-Bold="True" />
                        <HeaderStyle ForeColor="White" BackColor="#4A3C8C" Font-Bold="True" Height="20px" />
                        <RowStyle BackColor="#EEEEEE" ForeColor="Black" Height="40px" />
                        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                        <AlternatingRowStyle BackColor="Gainsboro" />
                    </asp:GridView>
j'ai un bouton qui remplit la table:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
 Session("SqlStr") = "Select Nom, Prenom as Prénom, Poste from Contact  "
 
 
                If Session("con").state = 1 Then 'base ouverte
                    Session("con").close()
                    Session("con").open()
                Else
                    Session("con").open()
                End If
 
                Session("Cmd") = New SqlCommand(Session("SqlStr"), Session("con"))
                Session("DR") = Session("Cmd").ExecuteReader
 
                If Session("DR").HAsRows Then
                    GridView3.DataSource = Session("DR")
                    GridView3.DataBind()
                    Button5.Enabled = True
                Else
                    Label20.Visible = True
                    Label20.Text = ("Pas de résultats pour cette recherche")
                    GridView3.DataSource = ""
                    GridView3.DataBind()
                End If
 
                Session("con").close()
comment je peux ajouter le tris de mes colonnes
sachant que j'ai ajouté
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
allowsorting="True"
Merci