插入/更新/删除为该控件禁用。 EntityDataSource消息 [英] Insert/Update/Delete is disabled for this control. message of EntityDataSource

查看:178
本文介绍了插入/更新/删除为该控件禁用。 EntityDataSource消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 ASPxGridView EntityDataSource 作为它的数据源。在 EntityDataSource ,我写的CommandText,所以我不能设置EnableInsert,EnableUpdate或EnableDelete为true。这手动就是为什么我操作(插入,更新,删除)数据。变更是手工制作传递到数据库中。但在GridView控件的侧面给出了这些错误:

I use ASPxGridView and EntityDataSource as its datasource. In EntityDataSource, I write CommandText, so I can not set "EnableInsert", "EnableUpdate", or "EnableDelete" to true. That's why, I manipulate (insert, update, delete) data manually. Changes are made manually pass through to database. But at the side of the GridView these errors are given:

有关插入:将被禁用此控件结果
对于更新:更新为这个控制失效。结果
删除:删除为该控件被禁用。

我该如何解决这个问题呢?

How can I solve this problem?

(使用的CommandText的原因是,其中的参数和用于在GridView中示出超过1表接合。)

(The reason of using CommandText is where parameters and joining of more than 1 tables for showing in GridView.)

推荐答案

首先,你必须在表中的主ID,你必须有它在的形式,所以你可以将它插入,或最好,可以设置递增键,只需输入值。
然后,你必须设置控制值属性。
然后,它应该工作。

First you must have primary ID in table, and you must have it in form so you can insert it, or ideally, you set incrementing key, and just input values. Then you have to set value property for control. And then it should work.

这篇关于插入/更新/删除为该控件禁用。 EntityDataSource消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆