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. Date Compare Validation Inside a Data Grid

Date Compare Validation Inside a Data Grid

Scheduled Pinned Locked Moved ASP.NET
css
2 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.
  • R Offline
    R Offline
    Ravi_21
    wrote on last edited by
    #1

    Hello i m using a datagird and when edit mode i want to compare the two date but it dont work the code inside edit item template is: Operator="LessThanEqual" Type="Date" ErrorMessage="*Required" Display="Dynamic" EnableClientScript="true">

    C 1 Reply Last reply
    0
    • R Ravi_21

      Hello i m using a datagird and when edit mode i want to compare the two date but it dont work the code inside edit item template is: Operator="LessThanEqual" Type="Date" ErrorMessage="*Required" Display="Dynamic" EnableClientScript="true">

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      'does not work' are three little words that can mean so much. How does it not work ? What makes you think the compare validator knows how to compare two dates ? I would assume it's going to do a string compare, which means it will compare the two first characters, and only move on if they are the same, is that what's happening ? I doubt it can do date compares, although I know there's a property to tell it what sort of comparison to do. I suspect you need to write your own JS to do this.

      Christian Graus Driven to the arms of OSX by Vista.

      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