Is there any way to affect gridview row appearance based on contents?

C

COHENMARVIN

I have a gridview with a button that should only appear if the
database routine it is based on returns a value of 'True' for the
database field "ReservationsExist". So I tried putting in the
following:

<asp:ButtonField ButtonType="Button"
CommandName="Reservations"
HeaderText="View Reserves"
Text="View Reserves" Visible='<%#
Eval("ReservationsExist") %>' />

This does not work. I get an error message saying that ButtonFields
don't have a 'DataBinding' event, and therefore I can't do this.
Is there some way of doing this? In general it would enhance a
gridview if you could do things like this.
-- Thanks,
Marv.
 

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

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top