【问题标题】:How to display custom error message on EditForm Template of AspXGrid?如何在 AspXGrid 的 EditForm 模板上显示自定义错误消息?
【发布时间】:2011-12-05 23:58:29
【问题描述】:

DevExpress AspXGrid 有一个很酷的编辑表单模板,您可以使用它多种 ui 样式作为弹出表单或网格行之间的内联表单等。

当您未实现网格的更新事件并允许网格从设置中进行编辑时,它会显示 EditForm,但是当您在此状态下触发更新按钮时,它会显示一个很酷的错误消息,例如“不支持指定的方法”。 .

我想在该消息的同一位置写一些自定义消息。

有人知道我该怎么做吗?

非常感谢。

【问题讨论】:

    标签: asp.net devexpress aspxgridview edititemtemplate


    【解决方案1】:

    使用ASPxDataValidationEventArgs.RowError 属性指定Error Row 中显示的错误文本。如果 RowError 属性设置为非空字符串,此行将自动显示在 Edit Form 下方。

    请同时查看GridEditing/Validation 演示模块和 ASPxGridView documentation

    【讨论】:

    • 谢谢MrDmitry,您提供的信息非常有用。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多