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

Binding Item Template to a Dataset

1 Answer 59 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Rodney
Top achievements
Rank 2
Rodney asked on 26 Apr 2017, 01:48 PM

Hi,

I'm trying to create a multi-column dropdown list based on this example: Telerik APS.Net ComboBox Demo. My problem is I'm getting my data back as a DataSet, it's not a DataSource, and I'm unclear as to how to bind the dataset to the control. I tried using the evals etc as described in the example, but I get an error DataSource expected.

Any help would be greatly appreciated.

Rodney

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 28 Apr 2017, 06:52 AM

Hello Rodney,

I have answered your support ticket with this question and I am adding my response here for anyone else with a similar question


Where the data comes from is not really relevant, what is important is that it contains the needed fields (columns).

Can you confirm that you have also copied the CSS from the demo? Also, the first combo uses load on demand, yet its template and the databinding expressions are in the markup. The Text and Value are set so the combo can continue working like a combo regardless of the elaborate display change. The Value, for example, is needed for the POST and so you can identify selected item, the Text is also there so the combo API can work.

I am attaching here a modified version of the demo that contains the styles, the script and data binds to a data set in the server code. I hope this helps you move onward.

 

 

Regards,

 

Marin Bratanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
DropDownList
Asked by
Rodney
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Share this question
or