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. General Programming
  3. C#
  4. validate date.... plz help

validate date.... plz help

Scheduled Pinned Locked Moved C#
helptutorial
1 Posts 1 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.
  • P Offline
    P Offline
    P_Elza
    wrote on last edited by
    #1

    hello I want to validate date on the template of datagrid. My code is

    if(e.Item.ItemType == ListItemType.Item)
    {
    TextBox txtGraRecItem=(TextBox)(e.Item.Cells[6].Controls[1]);
    txtGraRecItem.Attributes.Add("OnDblClick", "AssignDate('"+(dgDetailData.Items.Count+1).ToString()+"','"+e.Item.Cells[6].Controls[1].ID+"');");
    }
    if(e.Item.ItemType == ListItemType.AlternatingItem)
    {
    TextBox txtGraRecAItem=(TextBox)(e.Item.Cells[6].Controls[1]);
    txtGraRecAItem.Attributes.Add("OnDblClick", "AssignDate('"+(dgDetailData.Items.Count+1).ToString()+"','"+e.Item.Cells[6].Controls[1].ID+"');");
    }
    if(e.Item.ItemType == ListItemType.Item)
    {
    TextBox txtGraDueItem=(TextBox)(e.Item.Cells[7].Controls[1]);
    txtGraDueItem.Attributes.Add("OnDblClick", "AssignDate('"+(dgDetailData.Items.Count+1).ToString()+"','"+e.Item.Cells[7].Controls[1].ID+"');");
    }
    if(e.Item.ItemType == ListItemType.AlternatingItem)
    {
    TextBox txtGraDueAItem=(TextBox)(e.Item.Cells[7].Controls[1]);
    txtGraDueAItem.Attributes.Add("OnDblClick", "AssignDate('"+(dgDetailData.Items.Count+1).ToString()+"','"+e.Item.Cells[7].Controls[1].ID+"');");
    }

    how to validate cell[6] and cell[7]. cell 6 should be greater than cell 7. AssignDate is just calling a function to show calander. -- modified at 2:44 Monday 1st October, 2007

    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