Hello all,

I have a gridview which is bound to a sqldtatasource. The gridview has 3 columns and a select button. The data in the gridview pulls up just fine when I run the application and the first record is selected.

However when I select one of the other records, the gridview will not select it. The postback occurs and it remains on the first record. Here is code for my gridview and the sqldatasource:

Code:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                        AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
                        DataKeyNames="CustomerID" DataSourceID="SqlDataSource1" ForeColor="#333333" 
                        GridLines="None" SelectedIndex="0" Width="100%">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" 
                                InsertVisible="False" ReadOnly="True" SortExpression="CustomerID" 
                                Visible="False" />
                            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                            <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                            <asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
                            <asp:ButtonField ButtonType="Button" Text="Select" />
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:TechSupportConnectionString %>" 
                        SelectCommand="SELECT [CustomerID], [Name], [City], [State] FROM [Customers] ORDER BY [Name]">
                    </asp:SqlDataSource>
Can anyone see what I may be missing?

Thanks,

Strick