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

as EditTemplate in dynamically created RadGrid

1 Answer 119 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 09 Nov 2012, 04:19 PM
I would appreciate help in getting following scenario working:

On Page_Init, RadGrid is created, with GridTemplateColumn. For this column, I need RadAutoCompleteBox in its EditItemTemplate.

1. Since EditItemTemplate does not exist untill Edit button is clicked ( "Unable to cast object of type 'Util.MyRadAutoCompleteTemplate' to type 'System.Web.UI.IBindableTemplate'"), I set the custom template as ItemTemplate.

2. When ItemTemplate is created (Page_Init), I set the DataSource

3. I tried both InputTypes, text and token

4. ViewState is enabled

Result is no lookup happens. I read about supplying the input text to data source query on the Page_Load manually, however I don't see this working with a dynamically created RadGrid.

Previous attempt includes, creating empty GridTemplateColumn on Page_Init, and adding RadAutoCompleteBox on grid_ItemCreated if in edit mode. In this scenario, item is populated correctly on load, I am able to set selected value on edit item, but main problem still remains, querying does not work.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 14 Nov 2012, 01:06 PM
Hello Michael,

I can suggest you to refer to our help article, where you could observe how to instantiate the EditItemTemplate in the Page_Init event. In addition, if this does not help, I would like to ask you to open a support ticket, along with a runnable sample attached, which demonstrates the exceptions you had faced.

Kind regards,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
AutoCompleteBox
Asked by
Michael
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or