You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用AutoQuery和AutoQueryGrid更新记录时禁用输入的问题

问题:AutoQueryGrid更新记录时[Field]特性设置禁用/只读无效

在使用AutoQuery和AutoQueryGrid更新记录时,我希望将指定字段的输入框设为禁用或只读状态。尝试在UpdateProduct类上使用[Field]特性(包括类级别和属性级别)均未生效,但在创建记录的CreateProduct类上使用完全相同的[Field]特性却能正常生效。

创建记录时生效的代码示例

[Field(nameof(RegistrationDate), Disabled = true)]
[Field(nameof(InactiveDate), Disabled = true)]

public class CreateProduct : ICreateDb<Product>, IReturn<IdResponse>
{
    // ...
}

更新记录时无效的代码示例

[Field(nameof(RegistrationDate), Disabled = true)]
[Field(nameof(InactiveDate), Disabled = true)]
public class UpdateProduct : IPatchDb<Product>, IReturn<IdResponse>
{
    // ...
}

请问这是我操作有误,还是AutoQuery的设计本身如此?

内容的提问来源于stack exchange,提问作者Almircar Montilla

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.20 20:25:53