Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Display Date Validation as Checkbox in GridView Row

Display Date Validation as Checkbox in GridView Row

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    ziopino70
    wrote on last edited by
    #1

    Hi, I have a GridView control which is currently bound to an object which contains a DateTime property, "Survey Date". As the GridView width is limited, I want to display a checkbox instead of a DateTime to indicate that the survey has taken place. The survey is deemed to have taken place if a value has been entered for the survey date/time. I can't bind a checkbox property using the DateTime in the GridView row can I? Somehow I'd have to check the DateTime object and if valid, set the checkbox to true and false otherwise. Any ideas welcome! :)

    P 1 Reply Last reply
    0
    • Z ziopino70

      Hi, I have a GridView control which is currently bound to an object which contains a DateTime property, "Survey Date". As the GridView width is limited, I want to display a checkbox instead of a DateTime to indicate that the survey has taken place. The survey is deemed to have taken place if a value has been entered for the survey date/time. I can't bind a checkbox property using the DateTime in the GridView row can I? Somehow I'd have to check the DateTime object and if valid, set the checkbox to true and false otherwise. Any ideas welcome! :)

      P Offline
      P Offline
      Paramhans Dubey
      wrote on last edited by
      #2

      Bind Your check box like this

      Z 1 Reply Last reply
      0
      • P Paramhans Dubey

        Bind Your check box like this

        Z Offline
        Z Offline
        ziopino70
        wrote on last edited by
        #3

        Thanks, I made a minor change to remove the ConvertToDateTime() call and it works just fine :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups