This is a migrated thread and some comments may be shown as answers.

Unable to click into or enter text for AutoCompleteBox inside RadGrid

1 Answer 80 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Jacob
Top achievements
Rank 1
Jacob asked on 30 Apr 2020, 02:24 PM

Hello,

I am having an issue where users are unable to click into a RadAutoCompleteBox and enter any text. The input exists within an EditItemTemplate of a GridTemplateColumn. Previously, we were using the grids batch edit mode but switched over to InPlace so the entire row appears editable. All other controls aside from RadAutoCompleteBox work as expected.

ASPX code

<telerik:RadGrid ID="grdDeployment" runat="server"
      AllowPaging="true"
      AllowCustomPaging="true"
      AllowSorting="true"
      AutoGenerateColumns="false"
      ShowStatusBar="true"
      ClientSettings-AllowKeyboardNavigation="true"
      ClientSettings-Scrolling-AllowScroll="true"
      ClientSettings-Scrolling-UseStaticHeaders="true"
      OnPageIndexChanged="grdDeployment_PageIndexChanged"
      OnSortCommand="grdDeployment_SortCommand"
      OnItemDataBound="grdDeployment_ItemDataBound"
      OnNeedDataSource="grdDeployment_NeedDataSource"
      EnableViewState="true"
      Visible="true" >
    <MasterTableView EditMode="InPlace" AllowCustomSorting="true" AllowMultiColumnSorting="false"
      DataKeyNames="Uid, IsReferencedByContinuousResult" ClientDataKeyNames="Uid, IsReferencedByContinuousResult" >
      <Columns>
        <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn" HeaderText="" ItemStyle-Width="8%" HeaderStyle-Width="8%"></telerik:GridEditCommandColumn>
        <telerik:GridTemplateColumn HeaderText="Equipment ID*" UniqueName="EquipmentId"
                DataField="EquipmentId" HeaderStyle-Width="10%" >
              <ItemTemplate>
                <asp:Label Text='<%# Eval("EquipmentId") %>' runat="server" />
              </ItemTemplate>
          <EditItemTemplate>
                <telerik:RadAutoCompleteBox ID="acbEquipment" runat="server"
                  EnableClientFiltering="true" MinFilterLength="2" DropDownHeight="150" DropDownWidth="600px" Width="95%"
                  InputType="Text" DataValueField="Uid" DataTextField="Id" TextSettings-SelectionMode="Single" OnLoad="acbEquipment_Load">
                </telerik:RadAutoCompleteBox>
              </EditItemTemplate>
        </telerik:GridTemplateColumn>

 

Code Behind

 

protected void acbEquipment_Load (object sender, EventArgs e) {
      RadAutoCompleteBox acb = sender as RadAutoCompleteBox;
      PopulateEquipmentSelect(acb);
    }
 
private void PopulateEquipmentSelect(RadAutoCompleteBox equipmentAutoCompleteBox, bool preLoad = false) {
      equipmentAutoCompleteBox.TextSettings.SelectionMode = RadAutoCompleteSelectionMode.Single;
      EquipmentList equipmentList = EquipmentList.GetEquipmentList(_pageState.OrganizationUid, true, null);
      
      equipmentAutoCompleteBox.DataSource = equipmentList;
      equipmentAutoCompleteBox.DataBind();
}

1 Answer, 1 is accepted

Sort by
0
Doncho
Telerik team
answered on 05 May 2020, 02:35 PM

Hi Jacob,

Check out the RadAutoCompleteBox section in our KB article Edit and insert with autocomplete. It shows how AutocompleteBox can be implemented for RadGrid. Please double check your project and compare the two logic to see what is done differently. With that approach from the article, the AutoCompleteBox will be accessible by clicking on it.

If that doesn't help you, please share more details about the current project you have. We need to see the entire implementation to be able to understand the cause for he problem.

I look forward to hearing from you.

Kind regards,
Doncho
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
AutoCompleteBox
Asked by
Jacob
Top achievements
Rank 1
Answers by
Doncho
Telerik team
Share this question
or