We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

how to create syncfusion dropdownlist in angularjs

Thread ID:

Created:

Updated:

Platform:

Replies:

118363 Mar 3,2015 12:53 AM Mar 4,2015 07:05 AM JavaScript 1
loading
Tags: ejDropDownList
Tejaswini
Asked On March 3, 2015 12:53 AM

Hi,

I am using syncfusion dropdownlist. I want to create a dropdownlist for blood group in my form. How can I do that in angularjs?

<input type="text" ej-dropdownlist e-datasource="BloodGroup_List" e-value="Name">

In my controller I have written,

$scope.bloodgroup = [{ "Id": "1", "Name": "O+" },
                                  { "Id": "2", "Name": "O-" },
                                  { "Id": "3", "Name": "A+" },
                                  { "Id": "4", "Name": "A-" },
                                  { "Id": "5", "Name": "B+" },
                                  { "Id": "6", "Name": "B-" },
                                  { "Id": "7", "Name": "AB+" },
                                  { "Id": "8", "Name": "AB-" }];

    $scope.BloodGroup_List = $scope.bloodgroup;

The above code is not working, where am I wrong?



Sasikala Nagarajan [Syncfusion]
Replied On March 4, 2015 07:05 AM

Hi Tejaswini,

Thanks for using Syncfusion Products,

We have analyzed your query and code snippet. We suspect that the issue may be caused due to missing of text field in data source. If you want to use Name field values in dropdown list text then you have to map the “Name” field as Text field.

Please refer the below code snippet

[html]

<input type="text" ej-dropdownlist e-datasource="BloodGroup_List" e-value="Name" e-fields-text="Name" } />

For your convenience we have prepared the simple sample based on this. Please get the sample from below location

Sample

Please use this modified code in your sample to resolve the issue and let us know if you have any further queries.

Regards,

Sasikala Nagarajan



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;