How to compare two cells value in Grid via Compare Validator?
2012-01-04 14:27
363 查看
How to compare two cells value in Grid via Compare Validator?
http://www.telerik.com/community/forums/aspnet-ajax/grid/rad-grid-templatecolums-compare-validator.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/rad-grid-templatecolums-compare-validator.aspx
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) { if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditableItem item = e.Item as GridEditableItem; RadTimePicker start = (RadTimePicker)item.FindControl("rtpStartTime"); RadTimePicker end = (RadTimePicker)item.FindControl("rtpEndTime"); TableCell cell = (TableCell)start.Parent; CompareValidator val = new CompareValidator(); val.ControlToCompare = start.ID; val.ControlToValidate = end.ID; val.Operator = ValidationCompareOperator.GreaterThan; val.ErrorMessage = "Error message"; cell.Controls.Add(val); } }
相关文章推荐
- How to compare two worksheets in a workoo
- How to Compare two layer’s object: Get AOT objects both modified in USR & SL1 layer
- How to Check if an Array Contains a Value in Java Efficiently?
- How to: Host Controls in Windows Forms DataGridView Cells (CalendarCell)
- How to get data from Oracle DB in silverlight via WCF ?
- How to read text file in client side via HTML5
- whatever how, this should be record and be researched later. ---- about how to enable gpio value set in mach_smdk6410.c
- 如何获取BootStrap Modal中按钮的值,How to catch value from buttons in BootStrap Modal
- How to pass NULL value to a Multi value parameter in SSRS?
- How to display sub-totals in ALV Grid List?
- How to replace a value in web.xml with a Maven property?(转)
- How to clear a TextBox value in a single click in C# .NET
- LS1012ARDB - How to reflash u-boot / RCW via built in Kinetis CMSIS-DAP
- Hashtable and HashMap are two hash based collection in Java and used to store objects as key value p
- how to get the return value from a thread in python?
- XAF How to enable LayoutView mode in the GridControl in List Views
- How to override compareTo method in Java - Example Tutorial
- How to detect intersection of two faces in 3D
- How to make two <div>…</div> in the same row?
- How To Add a TwoFields Validator