Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have a grid view showing images from database table.
It has two columns, one is for showing images and another for one for action button...
there is one action button to activate and deactivate image
I want to enable deactivate button if flag is zero or enable activate button when flag is one
any idea, how to do that?
thanks
Posted

Solution 1: Bind the Enabled property of the LinkButton to the flag field from the database.

Solution 2: RowDataBound Event is fired when a GridView row gets bound. You can use this event. You will basically get the value of the flag, find your control and enable/disable it based on the flag value. Read more on this event in MSDN[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900