I have a grid that displays a DateTime field. The user has the ability to filter this DateTime field. I want to make sure the user enters only valid DateTime values (i.e. 1/1/2010). So, how can I check the filter? I wrote the following code in the grid ItemCommand event but I don't know how to complete it. Can someone tell me which property to check so I can make sure that what the user entered is a valid date?
| protected void gridMain_ItemCommand(object sender, GridCommandEventArgs e) |
| { |
| if (e.Item is GridFilteringItem) |
| { |
| GridFilteringItem FilteringItem = e.Item as GridFilteringItem; |
| // what do I do now? |
| } |
| } |