Advertisement Jump to content
Sign in to follow this  

[web] Using the Repeater Control, ASP.Net

This topic is 3810 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to create a rather professional look on my Repeater control and I'm having a hard time with that. My design looks terrible.. most importantly, I'm trying to underline the text and make it so that the highlighting of the entry is done only on the word itself and not the entire line. Moreover, "underlining the word is also important. At the moment I'm using the command below to highlight the entries (WHICH LOOKS TERRIBLE) .. this method below is called each time a line in the repeater is rendered onto the screen.
protected void membersDataItems_ItemDataBound(object sender, RepeaterItemEventArgs e)
     Panel panel = (Panel)e.Item.FindControl("pnlRow");   
 //Removed the code here to check if current line needs to be highlighted  
 panel.BackColor = System.Drawing.Color.Yellow; // this is the code to highlight current line.. BUT HIGHLIGHTS ENTIRE LINE :( (EVEN BLANK SPACE)

EDIT::: I was thinking... Is there a way to access the text inside the panel? This line "Panel panel = (Panel)e.Item.FindControl("pnlRow"); " .. returns the panel.. so maybe there's a way to return the text associated with the panel?? This would allow me to make it a lot nicer and probably allow me to highlight -> "ONLY THE TEXT" and not the entire line. full code Any help on what I should change to make this a little nicer would be great! - Eric [Edited by - Instigator on July 27, 2008 7:10:47 PM]

Share this post

Link to post
Share on other sites
best way is to create your own control, that way you can modify whatever you like. I hate using the controls (other than the validation controls) in Visual Studio - hate not being able to change every detail.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!