467,180 Members | 1,114 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,180 developers. It's quick & easy.

Highlight gridview row when clicked

J
I'm trying to highlight a gridview row when it is clicked. Because the
gridview is populated via ajax, adding attributes using OnRowCreated doesn't
work. How can I best accomplish this? Thanks.
Aug 1 '08 #1
  • viewed: 2033
Share:
2 Replies
Could you provide a little more detail (like how you are populating the
gridview via ajax) - -
You say you want to hightlight a row when it is clicked - this can easily be
accomplished with the formatting properties of the SelectedRowStyle

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
"J" <no****@nowhere.comwrote in message
news:jY******************************@posted.nuvox communications...
I'm trying to highlight a gridview row when it is clicked. Because the
gridview is populated via ajax, adding attributes using OnRowCreated
doesn't work. How can I best accomplish this? Thanks.

Aug 1 '08 #2
J
The users fills in a textbox then clicks a 'Search' button. The datasource
is then created and bound to the gridview with a dynamically created Select
statement. The datagrid is then displayed with the results (inside of an
ajax updatepanel).

If I have the gridview settings as such:
AutoGenerateSelectButton="True"
SelectedRowStyle BackColor="Red"
Clicking on the 'select' link won't change the background color to red.

"David Wier" <dw@dw.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
Could you provide a little more detail (like how you are populating the
gridview via ajax) - -
You say you want to hightlight a row when it is clicked - this can easily
be accomplished with the formatting properties of the SelectedRowStyle

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with
no bloated markup
"J" <no****@nowhere.comwrote in message
news:jY******************************@posted.nuvox communications...
>I'm trying to highlight a gridview row when it is clicked. Because the
gridview is populated via ajax, adding attributes using OnRowCreated
doesn't work. How can I best accomplish this? Thanks.


Aug 1 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Terry | last post: by
5 posts views Thread by Diane Truyens | last post: by
17 posts views Thread by toffee | last post: by
reply views Thread by =?Utf-8?B?cGI2NDgxNzQ=?= | last post: by
reply views Thread by gnewsgroup | last post: by
reply views Thread by =?Utf-8?B?ZWdzZGFy?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.