Dovberman
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-BackCo lor="#FFFF 66"
AlternatingRowStyle-Border Style="Sol id" Font-Names="Arial"
Font-Size="Smaller" AutoGenerateColumns="False "
DataKeyNames="SymbolID" DataSourceID="dscException s"
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_SelectedInde xChanged(o bject sender, EventArgs e)
{
string strStockSelectCon = "Data Source=localhost;Initial Catalog=StockSelectSQL;";
strStockSelectCon += "Integrated Security=SSPI";
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-BackCo
AlternatingRowStyle-Border
Font-Size="Smaller" AutoGenerateColumns="False
DataKeyNames="SymbolID" DataSourceID="dscException
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_SelectedInde
{
string strStockSelectCon = "Data Source=localhost;Initial Catalog=StockSelectSQL;";
strStockSelectCon += "Integrated Security=SSPI";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.