View Single Post
  #1 (permalink)  
Old January 19th, 2007, 08:37 AM
Lovehead Lovehead is offline
Registered User
 
Join Date: Dec 2006
Location: Tucson, Az, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid display

I have 2 buttons, Button A for list all employees.Button B for search employee by last name. Result is displayed in a datagrid.
Button A works when program starts and fills the datagrid with list of all employees. Button B works while data grid is displaying list of all employees, and changes the display with employees with same lastname. But after I have used button B Button, A do not work or say datagrid do not display list of all employees here is the code for Button A

        dgdEmpSearch.Visible = True
        DsEmployees1.Clear()
        daEmployees.Fill(DsEmployees1)
        dgdEmpSearch.Refresh()
Do I need to clear the datagrid before "daEmployees.Fill(DsEmployees1)" then I do not know the command to do it. Please give the command syntex too.





js
Reply With Quote