Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8627521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:18:04+00:00 2026-06-12T08:18:04+00:00

As mentioned in the title, i have a GridView, which retrieves the data from

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:18:05+00:00Added an answer on June 12, 2026 at 8:18 am

    I would be tempted to use something like the code below.

    <asp:TemplateField HeaderText="enable" ItemStyle-HorizontalAlign="Center" >
        <ItemTemplate>
            <%# Convert.ToString(Container.DataItem) == "0" ? "Disabled" : "Enabled" %>
        </ItemTemplate>
    </asp:TemplateField>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried using a example file using PHPExcel script to extract data from
Pretty much what I have mentioned in the title. I am using CanCan::Ability in
I have meet the error mentioned in the title, here is the code in
As I have mentioned in the title, my dispatch_async is firing 10 times. And
I'm using jEdit 4.3 pre 16. As I've mentioned on the title, when I'm
So I have a class made specifically for holding an event handling method which
same as in title? I have a test server with mentioned OS and my
Is it possible what I have mentioned in the title? I would like to
I am new to script writing. I have encountered the mentioned in the title
As the title mentioned, I have developed a simple NFC app in eclipse and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.