ComponentOne Studio for WinForms包含超过65个.NET的控件,其中,还有一些是 WinForms所独有的。它拥有敏捷的设计器、数以百计的样例和一个活跃的 区论坛。它可以帮你完成任何事,不管是要设计一个拥有百万行的Grid还是一张具有无数点的图表。

.NET控件集ComponentOne最新试用版

添加数据验证

  • Visual Basic

Private Sub C1FlexGrid1_ValidateEdit(ByVal sender As Object, ByVal e AsValidateEditEventArgs) Handles C1FlexGrid1.ValidateEditDim rgn As String = String.Empty Dim prd As String = String.Empty' 收集我们需要的数据Select Case e.Col prd = C1FlexGrid1.Editor.Textrgn = C1FlexGrid1(e.Row, "Region") Case 1prd = C1FlexGrid1(e.Row, "Product") rgn = C1FlexGrid1.Editor.Text End Select' 我们可以在北部区域卖小程序If prd = "Applets" And rgn = "North" ThenMsgBox("Warning: Regulation #12333AS/SDA-23 forbids " & _"the sale of " & prd & " in region " & rgn & ". " & _ "Please verify input.") e.Cancel = TrueEnd IfEnd Sub
  • C#
private void c1FlexGrid1_ValidateEdit( object sender, ValidateEditEventArgs e){string rgn = string.Empty;string prd = string.Empty; //收集我们需要的数据.switch (e.Col){case 0:prd = c1FlexGrid1.Editor.Text; rgn = (string)c1FlexGrid1[e.Row, "Region"]; break; case 1:prd = (string)c1FlexGrid1[e.Row, "Product"]; rgn = c1FlexGrid1.Editor.Text; break;}//我们可以在北部区域卖小程序if ( prd == "Applets" && rgn == "North" ) {MessageBox.Show("Warning: Regulation #12333AS/SDA-23 forbids " +"the sale of " + prd + " in region " + rgn + ". " + "Please verify input."); e.Cancel = true;}}

如果你对我们的文章或者产品感兴趣或者有任何疑问,欢迎咨询在线客服>>

高端UI界面开发
标签:

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2020年7月11日
下一篇 2020年7月11日

相关推荐

发表回复

登录后才能评论