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

Bind RadAutoComplete to IEnumerable<MyClass>

0 Answers 66 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 28 Jun 2017, 05:46 PM

I am not able to use a Web Service or Page Method (using Model View Presenter framework), so I am trying to implement a AutoCompleteBox with Server-Side Binding.

My data is coming back in a class that I want to bind a contact Name and ID to AutoCompleteBox and I am trying to figure out how to do it without much luck. So basically I have:

var contacts = Presenter.GetContactData(searchText);

 

I was hoping i could do something like this but having no luck:

 

        protected void Page_Load(object sender, EventArgs e)
        {
            Presenter.OnLoad();

                acbInsured.DataTextField = "FullName";
                acbInsured.DataValueField = "ClientKey";
                acbInsured.DataSource = Presenter.Presenter.GetContactData(acbInsured.Text).ToArray();
                acbInsured.DataBind();           
        }

 

Is there I way to bind to just an IEnumerable<SomeClass>?

 

No answers yet. Maybe you can help?

Tags
AutoCompleteBox
Asked by
Sean
Top achievements
Rank 1
Share this question
or