We help IT Professionals succeed at work.

How can I manipulte a grid view component column?

mmedi005
mmedi005 asked
on
258 Views
Last Modified: 2013-11-07
I have a gridview component that is databound to a sqldatasource.  I have one of the columns returning a value of 1 or 0.  But on the gridview component i want the 0 to really say NO, or 1 say YES instead of seeing 1 or 0.  How would I be able to achieve this?

Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Well that does sound good, but what if that 1 or 0 determines if a button should show in one of the columns rows.

I have a buttonfield in the last column.  

If that value is 0, DO NOT show button in that column. and the other column, have it display NO

If that value is 1, show button in that column, and the column have it display YES.

this is determine for each row....

Can this be done?

Commented:
Yes, you can still have both columns in your result set/data set. You just configure the grid to show the derived one as a UI column, and your code can still access either of the columns to support your other UI logic/behavior.

Author

Commented:
could you give me some example code?

thanks for teh help in advance

Author

Commented:
thanks anyways... i figured it out...
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.