TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
Go Back  Xtreme Visual Basic Talk > > > TextBox AutoComplete in DatagridView


Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2014, 04:38 AM
artskynet artskynet is offline
Newcomer
 
Join Date: Mar 2014
Posts: 1
Default TextBox AutoComplete in DatagridView


Hi Everyone,

I am having trouble with textbox autocomplete in my datagridview control. What I want to happen here is to enable the autocomplete in datagridview column 1 only and the rest columns (2,3, so on, so forth), autocomplete feature should be disabled. The autocomplete works fine when I tested it, but unfortunately, when the autocomplete was triggered from the specified column (column 1), it also worked with the other column cells as if the auto complete is available to all the cells in datagridview even if I specified in my validation is columnIndex = 1 only... I want the textbox autocomplete disabled to col2,3, so on, so forth. Please help me out guys.

Below is the code I used in my datagridview_EditingControlShowing event:

Private Sub dgvPOItems_EditingControlShowing(sender As Object, e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles dgvPOItems.EditingControlShowing

Dim TX As TextBox = CType(e.Control, TextBox)
If dgvPOItems.CurrentCell.ColumnIndex = 1 Then

If Not IsNothing(TX) Then

TX.AutoCompleteCustomSource = gacInventoryItemsLookUp
TX.AutoCompleteMode = AutoCompleteMode.SuggestAppend
TX.AutoCompleteSource = AutoCompleteSource.CustomSource

End If
Else
TX = Nothing
End If

End Sub
End If

Note: gacInventoryItemsLookUp is supplied upon program initialization.

Thanks,
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
 
TextBox AutoComplete in DatagridView
TextBox AutoComplete in DatagridView
 
-->