|
GridView 的Insert 事件要寫在那裡,如何去判斷兩個欄位結束日期是否比開始日期還要大? |
|
|
可以通過WebGridView的RowInserting來寫 WebGridView1_RowInserting(Object sender, GridViewUpdateEventArgs e) { DateTime timestart = e.NewValues["timestart"]; DateTime timeend = e.NewValues["timeend"]; if(timeend < tiemstart) { e.Cancel = true; } }
|
|
|