validate date.... plz help
-
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