bgcolor of repeater row

Discussion in 'ASP .Net' started by simon, May 31, 2005.

  1. simon

    simon Guest

    when I click the button in datarepeater, I would like to set the bgcolor of the row to red.
    I don't know how to get the reference to that row.

    Something like this?
    Private Sub rprPlists_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles rprPlists.ItemCommand

    If e.CommandSource.GetType.Name.ToString() = "Button" Then

    e.row.bgcolor=color.red
    pnlTest.visible=true

    end if



    Then I show test panel and after click the cancel button on that panel, I would like that the coloured row in my datarepeater is set back to white.

    Any example?

    Thank you,
    Simon
     
    simon, May 31, 2005
    #1
    1. Advertisements

  2. simon

    simon Guest

    Hi, eliyahu,

    do you have any example?

    I can't find the reference to the repeater row from e.item

    Thank you,
    Simon
    Simon,

    I would do all that on client side with javascript. This needs a bit of understanding of page object model. If it is not suitable for you, you can do it on server side.

    To get to the row use e.Item. Look up the help and try.

    Eliyahu

    when I click the button in datarepeater, I would like to set the bgcolor of the row to red.
    I don't know how to get the reference to that row.

    Something like this?
    Private Sub rprPlists_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles rprPlists.ItemCommand

    If e.CommandSource.GetType.Name.ToString() = "Button" Then

    e.row.bgcolor=color.red
    pnlTest.visible=true

    end if



    Then I show test panel and after click the cancel button on that panel, I would like that the coloured row in my datarepeater is set back to white.

    Any example?

    Thank you,
    Simon
     
    simon, May 31, 2005
    #2
    1. Advertisements

  3. Simon,

    I would do all that on client side with javascript. This needs a bit of understanding of page object model. If it is not suitable for you, you can do it on server side.

    To get to the row use e.Item. Look up the help and try.

    Eliyahu

    when I click the button in datarepeater, I would like to set the bgcolor of the row to red.
    I don't know how to get the reference to that row.

    Something like this?
    Private Sub rprPlists_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles rprPlists.ItemCommand

    If e.CommandSource.GetType.Name.ToString() = "Button" Then

    e.row.bgcolor=color.red
    pnlTest.visible=true

    end if



    Then I show test panel and after click the cancel button on that panel, I would like that the coloured row in my datarepeater is set back to white.

    Any example?

    Thank you,
    Simon
     
    Eliyahu Goldin, May 31, 2005
    #3
  4. Property ItemType tells you what is the type of the item. You won't find word "row" simply because repeater items don't have to look like rows. What exactly is in the item depends on your ItemTemplate. If you want table-like rows, use a datagrid.

    Eliyahu

    Hi, eliyahu,

    do you have any example?

    I can't find the reference to the repeater row from e.item

    Thank you,
    Simon
    Simon,

    I would do all that on client side with javascript. This needs a bit of understanding of page object model. If it is not suitable for you, you can do it on server side.

    To get to the row use e.Item. Look up the help and try.

    Eliyahu

    when I click the button in datarepeater, I would like to set the bgcolor of the row to red.
    I don't know how to get the reference to that row.

    Something like this?
    Private Sub rprPlists_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles rprPlists.ItemCommand

    If e.CommandSource.GetType.Name.ToString() = "Button" Then

    e.row.bgcolor=color.red
    pnlTest.visible=true

    end if



    Then I show test panel and after click the cancel button on that panel, I would like that the coloured row in my datarepeater is set back to white.

    Any example?

    Thank you,
    Simon
     
    Eliyahu Goldin, May 31, 2005
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.