bgcolor of repeater row

S

simon

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
 
S

simon

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
 
E

Eliyahu Goldin

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
 
E

Eliyahu Goldin

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
 

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top