As mentioned in the title, i have a GridView, which retrieves the data from the database using the DataBind method from code behind. However, one column of the my data is set value of 1 and 0, but i wish to change the value of int to text to show in GridView table.
For example, i have status (int) 0 and 1 in the database. So when i call them, the GridView just will show 0 and 1 in the table, but i want to change the 0 to replace by Enabled and 1 by Disabled in the GridView. How could i do that using if? But i not sure where to put. Can anyone help me with this?
I would be tempted to use something like the code below.