Solved

advanced datagrid, drop down list, listbox

Posted on 2003-10-26
3
281 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

752 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