zoukankan      html  css  js  c++  java
  • Kendo UI Search Panel(搜索框)不能搜索带有日期时间字段的问题

    报错:System.FormatException:“The string 'w' was not recognized as a valid DateTime. There is an unknown word starting at index '0'.”

    解决方式一

    ServerOperation(true) 改为 ServerOperation(false)

    解决方式二

    返回值都改为String类型(https://www.telerik.com/forums/input-string-was-not-in-a-correct-format-f0ec3a28879e)

    Search Panel 搜索面板
    开箱即用,网格使用户能够使用搜索面板搜索其数据。

    在幕后,搜索面板使用过滤来仅显示网格中的相关记录。

    入门
    要启用搜索面板功能,请Search在工具栏配置中包含该选项。

    @(Html.Kendo().Grid<CustomerViewModel>()
        .Name("Grid")
        .ToolBar(t => t.Search()) // Enable the Search panel.
        ...

    您还可以自定义在搜索输入中输入值时要搜索数据的字段。

    ...
    .Search(s=> { s.Field(c => c.ContactName); })

    官网已知问题

    Known Limitations
    When filtering is enabled in the filter textboxes for all Grid columns will be populated with the value entered in the search textbox.
    When the server operations are enabled, you can search only by using string fields. Using the Contains filter operation is available only for string types.
    已知限制
    当在过滤器文本框中启用过滤时,所有网格列的文本框将填充为在搜索文本框中输入的值。
    启用服务器操作后,您只能使用字符串字段进行搜索。使用Contains过滤操作仅适用于字符串类型。

    来自:https://docs.telerik.com/aspnet-core/html-helpers/data-management/grid/search-panel?_ga=2.31234296.615322369.1617307619-1217121827.1610481918&_gac=1.45804560.1614020023.EAIaIQobChMI5_PMjpX-7gIVA6GzCh0WawdMEAAYASAAEgJnP_D_BwE

  • 相关阅读:
    java Jquery表单校验代码jsp页面
    IntelliJ IDEA 2016.1.1(64) 长时间激活教程
    maven 仓库
    java学习路线
    json 源码包
    centos 安装docker
    实现高并发
    将MongoDB安装成为Windows服务
    给mongodb设置密码权限
    MongoDB的win安装教程
  • 原文地址:https://www.cnblogs.com/djd66/p/15262862.html
Copyright © 2011-2022 走看看