Telerik Vb.net自动完成RadTextBox

本文关键字:RadTextBox Vb net Telerik | 更新日期: 2023-09-27 18:03:26

我有一个RadTextBox,当用户输入值时,它将值存储到表(注释)中。我想在这个文本框中使用autocomplete属性,这样当用户尝试输入评论时,他就可以在那个文本框中查找那些评论表。有人能告诉我语法或正确的使用方法吗?我浏览了几个博客,但没有得到正确的信息。

文本框的语法:

  <telerik:RadTextBox ID="CommentsTB1" runat="server" 
                     EmptyMessage="" MaxLength="200" 
                     Rows="3" TextMode="MultiLine" Width="440px" Font-Bold="True" 
                     Font-Names="Tahoma, Arial, Helvetica" Font-Size="11px" ForeColor="#333333" AutoCompleteType="None">
                     <ClientEvents OnValueChanged="auditComments" />
                      </telerik:RadTextBox>

Telerik Vb.net自动完成RadTextBox

在浏览了许多博客后,我知道'AutoCompleteExtender'与RadTextbox不兼容。所以我使用'RadAutoCompleteBox'解决了我的解决方案

<telerik:RadAutoCompleteBox RenderMode="Lightweight" runat="server" ID="CommentsTB1" EmptyMessage="Please type here"
                                        DataSourceID="SqlDataSource1" DataTextField="Comments" InputType="Text" Width="350" DropDownWidth="150px" Delimiter=" ">
                                    </telerik:RadAutoCompleteBox>