Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cannot show autocomplete in textbox cell editor.

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
medbiller



Joined: 20 Dec 2007
Posts: 39
Location: Arroyo, PR

PostPosted: Sun Feb 14, 2016 9:05 pm    Post subject: Cannot show autocomplete in textbox cell editor. Reply with quote

I have the following code:

Code:
    Private Sub CellEditorTxtResult_SetControlValue(sender As Object, e As Infralution.Controls.VirtualTree.CellEditorSetValueEventArgs) Handles CellEditorTxtResult.SetControlValue
        If TypeOf e.Control Is TextBox AndAlso vtResults.SelectedRow IsNot Nothing AndAlso vtResults.SelectedRow.Level = 2 Then

            Dim txtCtrl As TextBox = DirectCast(e.Control, TextBox)
            With txtCtrl
                .Name = "txtResult"
                .AutoCompleteMode = AutoCompleteMode.SuggestAppend
                .AutoCompleteSource = AutoCompleteSource.CustomSource
                .AutoCompleteCustomSource.Add("aaa")
                .AutoCompleteCustomSource.Add("bbb")
                .AutoCompleteCustomSource.Add("12345")
            End With

        End If
    End Sub


The textbox shows up upon editing and text values can be entered and edited but the autocomplete feature is not working.
[/code]
_________________
Medical billing & records developer.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Feb 15, 2016 8:40 am    Post subject: Reply with quote

AutoComplete does not appear to work for TextBoxes if multiline is set to true. Virtual Tree sets multiline true by default. If you change that it should work. Your SetControlValue handler should also set the txtCtrl.Text text value of the control eg

Code:
txtCtrl.Text = e.Value.ToString()


Otherwise when you edit a cell the edit control will not be initialized with the existing value of the cell.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group