Results 1 to 4 of 4

Thread: Clear combo box n datagrid

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Posts
    68

    Lightbulb Clear combo box n datagrid

    Hello, How to clear e contents in the combo box and datagrid after making the selection and wan to reselect again?
    Thanks all for e help....

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This will reset the combobox and nothing will be shown till user select some value :

    VB Code:
    1. ComboBox1.SelectedIndex = -1

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Posts
    68

    Lightbulb

    How abt e datagrid? Cos i search finished, got show the records ritez? Then i research again, e old records which i had searched in e beri 1st place, show again n combine with e new search.

    How to clear the contents in e datagrid in order to let mi search again?

    Thanks for all e help....

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Try this , though I didn't test it :

    VB Code:
    1. DataGrid1.DataSource = Nothing
    2. DataGrid1.Refresh()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width