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

推荐订阅源

MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
H
Help Net Security
雷峰网
雷峰网
V
Visual Studio Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
IT之家
IT之家
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
月光博客
月光博客
A
About on SuperTechFans
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale

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

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));