惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
Y
Y Combinator Blog
Recorded Future
Recorded Future
博客园 - Franky
I
InfoQ
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Cloudbric
Cloudbric
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Check Point Blog
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
U
Unit 42
N
Netflix TechBlog - Medium
The Cloudflare Blog
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
B
Blog
S
Securelist
H
Hacker News: Front Page
Google Online Security Blog
Google Online Security Blog
G
Google Developers Blog

博客园 - 熵星尘

苦逼的程序员都是这么玩游戏的(微信:天天连萌) 关于ASP.NET动态加载控件的几点实用总结 记录代码运行耗时的写法 关于Linq to DataTable not in的写法 发现一个Membership的bug 无法将类型为“Oracle.DataAccess.Types.OracleString”的对象强制转换为类型“System.String”。 asp.net页面中文件下载的2种方式 - 熵星尘 - 博客园 gridview 的添加删除等技巧 全部按名称取值 【部分转】innerText 跟 innerHTML区别 asp.net验证组件membership登录失败的问题 母板页中的引用的图片,JS,css等路径问题 - 熵星尘 - 博客园 如何获取GridView的EmptyDataTemplate中的控件 Mutex实现单实例,你真的搞懂了吗?来看看吧。 VS2008 如何在WinForm中显示flash - 熵星尘 - 博客园 【原创】从图像转换到byte[]数组的几种方法 除夕晚的一帖:如何为repeater内部控件设置javascript,如何取得它们的客户端ID。 回发或回调参数无效。 问题的解决和思考 - 熵星尘 - 博客园 【作品发布】正式发布Tuff的神奇小软盘1.2 【作品发布】QQ2008远程自助 1.5.1.1
DevExpress AspxGridView数据绑定
熵星尘 · 2011-05-27 · via 博客园 - 熵星尘

绑定字段名可能区分大小写,oracle数据库通常需要全部大写字段名

点击编辑、删除等无效,检查KeyFieldName是否填写

KeyFieldName支持多个需要使用分号分割

取某行数据: DataRow dr = ASPxGridViewCurrentState.GetDataRow(ASPxGridViewCurrentState.FocusedRowIndex);
dr["ID"].ToString();

数据绑定时:
【selecting:】
DataSource控件中的参数将不自动添加。
如果定义了参数,与KeyFieldName中的主键名称相同的参数会出现在e.InputParameters的最后面,调用存储过程需要自己处理顺序。

“注意”:定义多个主键字段时,主键参数位置比较乱,请自行处理。

【deleting:】
DataSource控件中的参数将自动添加所有主键参数。

【updating:】
DataSource中不定义参数,将(1)自动添加字段参数,以及添加“老主键”字段参数,名称为datasource中的OldValuesParameterFormatString中定义的格式出现,如:old_{0},将出现v_ID,并出现在参数列表的最后面。

DataSource中定义了参数,与不定义时相同,只不过不出现未定义的绑定参数,“老主键”字段参数同样出现在最后。


“注意”:当OldValuesParameterFormatString使用了默认的{0},定义参数列表中的主键名称不变,值为老数据,即被OldValuesParameter覆盖了定义的那个主键参数。

【Inserting:】
不会自动增加或覆盖主键参数。

如果定义了参数:仍然会(1)自动添加字段参数。
未填写的值为null,可以在datasource里面定义类型和defaultvalue,如果定了主键参数,值仍然为null。

(1)自动添加字段参数:除主键字段外,添加visable不为false的,添加EditForm.Visable不为false的。

“注意”:添加与编辑状态的EditForm.Visable同时存在起效,EditMode=Inline时,认为所有字段EditForm.Visable为true。
“注意”:添加与编辑状态的EditForm.Visable同时存在起效,因为他们公用一个EditForm。

ObjectDataSource:
绑定ObjectDataSource的时候,只需要保证参数名称和个数一致,顺序不敏感。