Wednesday 15 January 2014

visual studio 2012 - Is there a RangeValidator in VB.net? -


I'm looking for an easy way to specify the inputs allowed for my DataGridView. I call MSDN a "Rangelidator" but it appears to be only for web development in ASP.NET. Does VB.NET 4.5 have an option to use Visual Studio 2012? My goal should be a datagrid virtual, which is only integer & gt; = Zero, and there is no partial input. I appreciate any suggestion and can give it to anyone. :.)

I found the bellow code I think it might help

 Code> Private Sub DataGridView1_EditingControlShowing1 (ByVal Sender, as the object, byVal and System.Down.Forms.DataGridViewEditingControlShowingEventArgs) handles DataGridView1.EditingControlContentCell.ColumnIndex = 1 then text box = DirectCast (E. txtedit.KeyPress, AddressOf TxtEdit_KeyPress end then end sub personal subtxtEdit_KeyPress (ByVal as the object, as byVal e KeyPressEventArgs) if DataGridView1.CurrentCell.ColumnIndex = 1 then ("0123456789 \ b" .indexOf (e.KeyChar) = -1) So if E.Kerker <<< Convert.ToChar (Keys.Back) then e.Handled = true end if end if end then End Sub    

No comments:

Post a Comment