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

推荐订阅源

H
Help Net Security
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
V
Visual Studio Blog
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
有赞技术团队
有赞技术团队
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
The Cloudflare Blog
Engineering at Meta
Engineering at Meta
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
Vercel News
Vercel News
F
Fortinet All Blogs
Last Week in AI
Last Week in AI
M
MIT News - Artificial intelligence
小众软件
小众软件
月光博客
月光博客
A
About on SuperTechFans

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

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