problem with GridView

J

Jeff

Hey

asp.net 2.0

I got a GridView on my webpage. When I run the webpage and select a row in
the GridView, the SelectedIndexChanged event isn't triggered. The row I
clicked on isn't marked as selected. I have enabled selection on the
GridView

Any suggestions on how to solve this is very welcome!

jeff
 
J

Jeff

this is the source of my GridView control
<asp:GridView ID="gvQuestions" runat="server" AutoGenerateColumns="False"
CellPadding="4"
DataKeyNames="id" DataSourceID="sdsQList" ForeColor="#333333"
GridLines="None">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="id" HeaderText="id" InsertVisible="False"
ReadOnly="True"
SortExpression="id" />
<asp:BoundField DataField="subject" HeaderText="subject"
SortExpression="subject" />
</Columns>
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True"
ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White"
HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>

I tested this a bit more and sometimes this works, sometimes the
SelectedIndexChanged event is triggered, but NOT every time

Jeff
 
F

filthysock

Hi Jeff,
I just copied and pasted that into a test project and linked it to a
sqldatasource and everything seems to work fine.
Are you doing any extra work in the codebehind?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top