TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Arshad Ali
NA
636
32.7k
Selec2 Value not binding when i update the record?
Oct 4 2020 10:32 AM
Hi Friends,
I am using the select2 controller binding the data on page load is working fine but when I click on the particular record the data not bind the properly on select2 controller.code is below.please guide thanks
function
openMembershipPlanOfferModal(id) {
var
url =
'/MembershipPlanOffer/Upsert/'
;
if
(id != undefined) {
url = url + id;
}
$(
'#membershipPlanId'
).select2({
ajax: {
contentType:
'application/json; charset=utf-8'
,
dataType:
'json'
,
type:
'GET'
,
url: url,
success:
function
(response) {
console.log(response);
var
membershipPlans = [];
response.data.forEach(
function
(value, key) {
membershipPlans.push({ id: value.id, text: value.name })
});
}
}
});
$.get(url,
function
(data) {
$(
"#membershipPlanOfferModal"
).html(data);
$(
"#membershipPlanOfferModal"
).modal(
'show'
);
});
};
Reply
Answers (
1
)
Get td tage value in jquery.
Ext Ajax request async issue