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

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Engineering at Meta
Engineering at Meta
T
Tenable Blog
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
NISL@THU
NISL@THU
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
P
Privacy & Cybersecurity Law Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Secure Thoughts
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
H
Hacker News: Front Page
I
InfoQ
L
LangChain Blog
Security Latest
Security Latest
The Cloudflare Blog
Forbes - Security
Forbes - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
Scott Helme
Scott Helme
爱范儿
爱范儿
A
Arctic Wolf
F
Full Disclosure
酷 壳 – CoolShell
酷 壳 – CoolShell
Schneier on Security
Schneier on Security
N
News and Events Feed by Topic
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
LINUX DO - 最新话题
V2EX - 技术
V2EX - 技术
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - 木人(我现在不是老大)

ERP系统的专业化发展趋势 讨厌的real和float数据 Svcutil使用点滴 windows server2003企业版64位安装sql server2008企业版64位 读书笔记 UltraGrid(16) 水晶报表使用push模式(2) 水晶报表使用push模式(1) SQL SERVER2000存储过程调试 读书笔记 UltraGrid(15) 读书笔记 UltraGrid(14) 读书笔记 UltraGrid(12) 读书笔记 UltraGrid(10) 读书笔记 UltraGrid(9) 读书笔记 UltraGrid(8) 读书笔记 UltraGrid(7) 读书笔记 UltraGrid(6) 读书笔记 UltraGrid(5) 读书笔记 UltraGrid(4) 读书笔记 UltraGrid(3)
读书笔记 UltraGrid(11)
木人(我现在不是老大) · 2012-02-12 · via 博客园 - 木人(我现在不是老大)

KeyActionMappings键盘映射
ultragrid缺省的键盘映射可通过以下程序得到:
DataTable dt=new DataTable();
dt.Columns .Add("keyCode");
dt.Columns .Add("actionCode");
dt.Columns .Add("stateDisallowed");
dt.Columns .Add("stateRequired");
dt.Columns .Add("specialKeysDisallowed");
dt.Columns .Add("specialKeysRequired");
DataRow row;

foreach (GridKeyActionMapping gkam in this.ultraGrid1.KeyActionMappings)
{
    row = dt.NewRow();
    row["keyCode"] = gkam.KeyCode;
    row["actionCode"] = gkam.ActionCode;
    row["stateDisallowed"] = gkam.StateDisallowed ;
    row["stateRequired"] = gkam.StateRequired ;
    row["specialKeysDisallowed"] = gkam.SpecialKeysDisallowed ;
    row["specialKeysRequired"] = gkam.SpecialKeysRequired ;
    dt.Rows.Add(row);
}
DataView dv = new DataView(dt, string.Empty, "keyCode Asc", DataViewRowState.CurrentRows);
this.ultraGrid1.DataSource = dv;
如果我们想改变其行为,如常见回车进入下一个单元格,则可如此设置:
this.ultraGrid1.KeyActionMappings.Add(new GridKeyActionMapping(
                Keys.Return,
                UltraGridAction.NextCellByTab,
                0,
                UltraGridState.Cell,
                SpecialKeys.All,
                0));