• DataGridView控件,输入大写,VB.NET实现


    用惯了第三方控件fpspread,只一个属性就可以设置输入大写,可用微软原装的DataGridView缺很麻烦,查到一个C#实现,改成VB.NET版本

        Private Sub GridTaskList_EditingControlShowing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles GridTaskList.EditingControlShowing
            Dim dgv As DataGridView = CType(sender, DataGridView)
            If TypeOf (e.Control) Is DataGridViewTextBoxEditingControl Then
                Dim EditingControl As DataGridViewTextBoxEditingControl
                EditingControl = CType(e.Control, DataGridViewTextBoxEditingControl)
                If dgv.CurrentCell.OwningColumn.DataPropertyName = "Stope_Id" Then
                    EditingControl.CharacterCasing = CharacterCasing.Upper
                Else
                    EditingControl.CharacterCasing = CharacterCasing.Normal
                End If
            End If
        End Sub

    参考:https://www.cnblogs.com/maozhh/archive/2007/09/24/904144.html

  • 相关阅读:
    Android开发日记(三)
    Android开发日记(二)
    Bundle savedInstanceState的作用
    Android Bundle类
    Consumer
    饭卡
    《CLR via C#》读书笔记 之 泛型
    WCF寄宿到Windows Service
    WCF中配置文件解析
    WCF Service Configuration Editor的使用
  • 原文地址:https://www.cnblogs.com/imhuanxi/p/14331415.html
Copyright © 2020-2023  润新知