By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,246 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,246 IT Pros & Developers. It's quick & easy.

bgcolor of repeater row

P: n/a
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

Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

"simon" <si*********@stud-moderna.si> wrote in message news:Oe***************@TK2MSFTNGP15.phx.gbl...
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

Nov 19 '05 #2

P: n/a
Hi, eliyahu,

do you have any example?

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

Thank you,
Simon
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message news:eO**************@TK2MSFTNGP10.phx.gbl...
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

"simon" <si*********@stud-moderna.si> wrote in message news:Oe***************@TK2MSFTNGP15.phx.gbl...
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

Nov 19 '05 #3

P: n/a
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

"simon" <si*********@stud-moderna.si> wrote in message news:u8******************@TK2MSFTNGP10.phx.gbl...
Hi, eliyahu,

do you have any example?

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

Thank you,
Simon
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message news:eO**************@TK2MSFTNGP10.phx.gbl...
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

"simon" <si*********@stud-moderna.si> wrote in message news:Oe***************@TK2MSFTNGP15.phx.gbl...
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

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.