My Dear Martin, Allan, Veena and All Member, Happy new year to all of u. But When I am working on Text Box Control with Got Foucs and Lost Focus Event it is giving problem in VB.
This means that as a programmer, you have the power to supply the exact pattern for the input you desire in any text input field. Again, certain special characters are obviously not allowed.
So, Instead of writing the code in Got Focus event, write the Code in " Enter" Event.....
In this example I will show how to validate the data entered into a datarepeater control.
Inside the datarepeater drag the Product Name, Unit Price, and Units in stock fields.
Your form should look something like Now in the drawitem event for the datarepeater we can add a handler to validating event. Data Repeater Item Event Args) Handles Data Repeater1. Item Index), Data Row View) Dim txt As Text Box = Direct Cast(e. Controls("Unit_Price Text Box"), Text Box) Add Handler txt. Cancel Event Args) Dim dec As Decimal If Not Decimal.