View Single Post
  #2 (permalink)  
Old January 20th, 2007, 05:12 PM
Lovehead Lovehead is offline
Registered User
Join Date: Dec 2006
Location: Tucson, Az, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

I solved the problem and i am givving the solution for the benefit of people like me. First let me explain what is happeniong here:
To search by name is done then a command is executed. Command sysntex is daYouradopter.selectcommand.commandtext="Select * from table where empname="searchname"
now this command is forcing when button A to list all employees is clicked and display never changes. therefore i had to give daYouradopter.selectcommand.commandtext="Select * from table and now i can display all entires from the table. Here is the actual code
        dgdempSearch.Visible = True
        daemployees.SelectCommand.CommandText = "Select * From tblemployees"

Reply With Quote