Removing columns from DataRepeater

  • Thread starter Thread starter Chris Leffer
  • Start date Start date
C

Chris Leffer

Hi.

I have a DataRepeater that is filled with the results of a query based
on four criteria fields. If one of these criterias is informed, I don't
need to display a certain column in my DataRepeater. I can do that using
an If expression on the HTML to conditionally show the column, but is it
possible to do that using code-behind only?

Regards,
Chris Leffer
 
Chris,

You should be able to access the items inside of your repeater as each item
is bound from within the OnItemDatabound event of the repeater. There you
should be able to cast to find the control your data is being bound to and
hide it.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

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

Back
Top