Link to home
Start Free TrialLog in
Avatar of Dovberman
DovbermanFlag for United States of America

asked on

GridView SelectedIndexChanged event does not fire.

I have a gridview with the select button enabled. When I click the select button, the
SelectedIndexChanged event does not fire.

<asp:GridView ID="grdExceptions" runat="server"
            AutoPostBack="True" Height="20px"
            Width="496px" Caption="Selected Stocks"
            BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
            BackColor="Azure" AlternatingRowStyle-BackColor="#FFFF66"
            AlternatingRowStyle-BorderStyle="Solid" Font-Names="Arial"
            Font-Size="Smaller" AutoGenerateColumns="False"
            DataKeyNames="SymbolID" DataSourceID="dscExceptions"
            AllowPaging="True" PageSize="16">
           
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="SymbolID" HeaderText="SymbolID"
                    InsertVisible="False" ReadOnly="True" SortExpression="SymbolID"
                    Visible="False" />

//This line is not reached when running in Debug mode.
protected void grdExceptions_SelectedIndexChanged(object sender, EventArgs e)
        {


            string strStockSelectCon = "Data Source=localhost;Initial Catalog=StockSelectSQL;";
            strStockSelectCon += "Integrated Security=SSPI";
ASKER CERTIFIED SOLUTION
Avatar of tiagosalgado
tiagosalgado
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial