zoukankan      html  css  js  c++  java
  • DevExpress GridView限制列只允许输入数字

    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);
    }
  • 相关阅读:
    Perforce笔记
    Lumia 800 无法正常开机
    Windows service 中出现Set ServiceLogin 对话框
    华为要求七千员工先辞职再竞岗 补偿费超10亿
    BLOG新址:http://longware.spaces.live.com
    家装(2)
    解脱
    论持久战
    有感于软件项目测试
    THE POEM AS A GIFT FOR MY GF'S BIRTHDAY
  • 原文地址:https://www.cnblogs.com/cainiaoji/p/1997961.html
Copyright © 2011-2022 走看看