Solved

advanced datagrid, drop down list, listbox

Posted on 2003-10-26
3
279 Views
Last Modified: 2006-11-17
hi
I am looking after the following "FREE" controls:
A datagrid list box which allows people to drag and drop rows so that they are sorted. Up and Down buttons are required too.
A dropdown list which does text auto complete like internet explorer does with the address field.

Thank you.
F
0
Comment
Question by:fouadkassab
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:the-edge
ID: 9625988
for the dropdown list which does text auto complete like internet explorer does with the address field take a look at this:

http://www.vbcity.com/forums/faq.asp?fid=38&cat=ListBox%2FComboBox
0
 

Author Comment

by:fouadkassab
ID: 9630137
the function does not work. anyway, the signature of the key up function is not identical to the one in the example.
0
 
LVL 3

Accepted Solution

by:
the-edge earned 500 total points
ID: 9630554
here's a sub in vb.net that autocomplete a combobox. you should call it within the KeyUp event of the combobox, passing the combobox and the e.KeyCode as parameter:

    Private Sub myCombo(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cbxUtente.KeyUp
        cbxAutocomplete(myCombo,e.Keycode)
    End Sub


    Sub cbxAutocomplete(ByVal myCombobox As ComboBox, ByVal myKey As Keys)
        Dim index As Integer
        Dim actual As String
        Dim found As String

        'Do nothing for certain keys such as the arrows and backspace and delete
        If myKey = Keys.Back Or myKey = Keys.Left Or myKey = Keys.Right Or (myKey = Keys.Up) Or (myKey = Keys.Delete) Or (myKey = Keys.Down) Then
            Exit Sub
        End If
        ' Store the actual text that has been typed
        actual = myCombobox.Text

        ' Find the first match for the typed value
        index = myCombobox.FindString(actual)

        'Get the text of the first match
        If index > -1 Then
            found = myCombobox.Items(index).ToString()
            'this.comboBox1.Text = found;
            myCombobox.SelectedIndex = index
            ' Select the automatically added text so further typing will replace it
            myCombobox.SelectionStart = actual.Length
            myCombobox.SelectionLength = found.Length
        End If
    End Sub
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question