文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>DevExpress GridView限制列只允许输入数字

DevExpress GridView限制列只允许输入数字

时间:2011-03-28  来源:菜鸟成长日记

using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Views.Grid;

private void gridView1_KeyPress(object sender, KeyPressEventArgs e) {
    GridView view = sender as GridView;
    string s = "0123456789";
    if (view.FocusedColumn.FieldName == "CustomerID" && s.IndexOf(e.KeyChar) >= 0)
        e.Handled = true;
}
private void gridControl1_EditorKeyPress(object sender, KeyPressEventArgs e) {
    GridControl grid = sender as GridControl;
    gridView1_KeyPress(grid.FocusedView, e);
}
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载