Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a grid inside i have 3 bound columns
1.empid
2.empno(editable)
3.empname

empno should allow only 20,21 ,if i enter not 20,21 then i want to show error message
VB
dim x as boolean=false
so in row updating event
if(empno==20 ||empno==21)
{
   //implementation
   x=true
}
if(x=false)
{
   lblmessage.text="please enter 20,21."
}

problem is lblmessage is was not displaying the text in runtime. please help me
Posted
Updated 4-Oct-12 4:25am
v3
Comments
DaveAuld 4-Oct-12 10:47am    
Where are you trying to perform this? What language are you trying to do this in? you have a right mishmash of things going on, and it is not clear.

1 solution

Look at your code to test x, you are assigning a value not testing a value;
if (x=false)

You should have;
if (x==false)
 
Share this answer
 
Comments
sai.2012 4-Oct-12 10:32am    
if(x=false)then
lblmessage.text=""
end if
ridoy 4-Oct-12 16:15pm    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900