Link to home
Start Free TrialLog in
Avatar of mmedi005
mmedi005

asked on

How can I manipulte a grid view component column?

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?

ASKER CERTIFIED SOLUTION
Avatar of Justin_W
Justin_W

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mmedi005
mmedi005

ASKER

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?
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.
could you give me some example code?

thanks for teh help in advance
thanks anyways... i figured it out...