Highlight gridview row when clicked

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J

    #1

    Highlight gridview row when clicked

    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.


  • David Wier

    #2
    Re: Highlight gridview row when clicked

    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 SelectedRowStyl e

    David Wier

    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "J" <nobody@nowhere .comwrote in message
    news:jYSdnZ_LPd aevw7VnZ2dnUVZ_ uOdnZ2d@posted. nuvoxcommunicat ions...
    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.
    >

    Comment

    • J

      #3
      Re: Highlight gridview row when clicked

      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:
      AutoGenerateSel ectButton="True "
      SelectedRowStyl e BackColor="Red"
      Clicking on the 'select' link won't change the background color to red.

      "David Wier" <dw@dw.comwro te in message
      news:%23UuU5s%2 38IHA.1180@TK2M SFTNGP03.phx.gb l...
      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 SelectedRowStyl e
      >
      David Wier

      http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with
      no bloated markup
      >
      >
      "J" <nobody@nowhere .comwrote in message
      news:jYSdnZ_LPd aevw7VnZ2dnUVZ_ uOdnZ2d@posted. nuvoxcommunicat ions...
      >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.
      >>
      >
      >

      Comment

      Working...