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

AutoComplete to GridDropDownColumn

2 Answers 196 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gerry Polami
Top achievements
Rank 1
Gerry Polami asked on 20 Jun 2011, 08:51 AM
Hello,
I have a grid with the GridDropDownColumn above :

<telerik:GridDropDownColumn HeaderStyle-Width="140" ItemStyle-Width="140" FooterStyle-Width="140"
              UniqueName="MCHAVER" DataField="MCHAVER" HeaderImageUrl="~/Skins/Gray/Grid/BursaMas.JPG" DropDownControlType="DropDownList"
                   ListTextField="Text" ListValueField="Key" AutoPostBackOnFilter="true"   />


I want to add AutoComplete  to this GridDropDownColumn.

How can i do it ?

Thanks,
Gerry

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Jun 2011, 09:35 AM
Hello Gerry,

In order to achieve this functionality, set DropDownControlType as RadComboBox and set AutoCompleteSeparator in ItemCreated event. Hope this helps.

C#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
         {
            GridEditableItem editedItem = e.Item as GridEditableItem;
            RadComboBox combo = (RadComboBox)editedItem["MCHAVER"].Controls[0] as RadComboBox;
            combo.MarkFirstMatch = true;         
        }
}

Also check the following help documentation which explains more about this.
Autocomplete.

Thanks,
Princy
0
Gerry Polami
Top achievements
Rank 1
answered on 20 Jun 2011, 09:42 AM
Hi Princy,
I like to stay with DropDownList as DropDownControlType .
is it possible ?
Thanks,
Gerry
Tags
Grid
Asked by
Gerry Polami
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Gerry Polami
Top achievements
Rank 1
Share this question
or