Autocomplete of text in datagridview..

  • (2 Pages)
  • +
  • 1
  • 2

17 Replies - 6276 Views - Last Post: 15 May 2013 - 11:54 AM Rate Topic: -----

#16 bradpitt1989  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 09-May 13

Re: Autocomplete of text in datagridview..

Posted 09 May 2013 - 07:19 AM

Hi!

You can get the help from following links. I hope it is very useful for developers related to "Autocomplete of Text In Datagridview".

http://www.mindstick...plete%20TextBox

http://www.vb-tips.c...toComplete.aspx
Was This Post Helpful? 0
  • +
  • -

#17 vks.gautam1  Icon User is offline

  • D.I.C Regular

Reputation: 17
  • View blog
  • Posts: 317
  • Joined: 21-March 08

Re: Autocomplete of text in datagridview..

Posted 09 May 2013 - 07:31 AM

View Postbradpitt1989, on 09 May 2013 - 07:19 AM, said:

Hi!

You can get the help from following links. I hope it is very useful for developers related to "Autocomplete of Text In Datagridview".

http://www.mindstick...plete%20TextBox

http://www.vb-tips.c...toComplete.aspx

thanks mate..
actually i want whole raw to move on with my type on datagridview..
right now im bz in other things in vb.net ..after some days i will continue to work on my task of moving all row with my type..i will continue this thread surely
Was This Post Helpful? 0
  • +
  • -

#18 ShadowProgrammer  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-May 13

Re: Autocomplete of text in datagridview..

Posted 15 May 2013 - 11:54 AM

I'm trying to do pretty much the exact same thing as vks, get auto complete to work in a single column in my datagrid, but I'm still having problems even after trying everything suggested in the previous answers here.

I think my problem is that I'm using a datagrid in Virtual Mode, because when I create a brand new datagrid not in Virtual Mode and do the suggestions here it works fine. But when I try to implement auto complete in my virtual datagrid nothing appears to happen.

This my code right now to get auto complete working in column 16 (index 15).
    Private Sub DataGridAuditView_EditingControlShowing(sender As Object, e As DataGridViewEditingControlShowingEventArgs) _
            Handles DataGridAuditView.EditingControlShowing
        If DataGridAuditView.CurrentCell.ColumnIndex = 15 Then 'Reviewer
            Dim lst As New List(Of String)

            Dim MySource As New AutoCompleteStringCollection()
            RunSQLiteCode("SELECT ALL FirstName, LastName FROM gblPersonnel", True, 1)
            While DSQLreader1.Read
                lst.Add(DSQLreader1("FirstName").ToString & " " & DSQLreader1("LastName").ToString)
            End While

            MySource.AddRange(lst.ToArray)
            Dim ReviewTextbox As TextBox = CType(e.Control, TextBox)
            ReviewTextbox.AutoCompleteCustomSource = MySource
            ReviewTextbox.AutoCompleteMode = AutoCompleteMode.SuggestAppend
            ReviewTextbox.AutoCompleteSource = AutoCompleteSource.CustomSource
        End If
    End Sub

I've thrown in breakpoints, and the sub Is running, and reading the data in from the database properly.

Anyone have any ideas what extra steps are needed to get auto complete to work in a virtual mode datagrid? I've been searching and reading through tutorials & guides for the last 3 hours with no luck at finding the answer.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2