回复 1楼reli的帖子
在客户端调用C1GridView.OnClientBeforeCellUpdate和OnClientAfterCellEdit。
代码参考:
- <wijmo:C1GridView ID="C1GridView1" runat="server"
- AutoGenerateDeleteButton="true" AllowClientEditing="true"
- OnClientBeforeCellUpdate="beforeCellUpdate" OnClientAfterCellEdit="afterCellEdit">
- <CallbackSettings Action="Editing" />
- </wijmo:C1GridView>
复制代码
JS代码如下:
- <script type="text/javascript">
- function beforeCellUpdate(e, args) {
- if (args.cell.column().dataField === "ShippedDate") {
- args.value = args.cell.container()
- .find("input")
- .wijinputdate("option", "date");
- }
- }
- function afterCellEdit(e, args) {
- if (args.cell.column().dataField === "ShippedDate") {
- args.cell.container()
- .find("input")
- .wijinputdate("destroy");
- }
- }
- </script>
复制代码 |