Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How can I do parent/child in the bootstrap multiselect ?
Mani Kandan
Apr 27 2017 12:52 AM
337
Reply
I am working on MVC 5,
How can I bind a category and sub-category to be shown in the same bootstrap multiselect dropdown ?
Here is the table structure and table name is 'productcategory'.
View,
<pre><script src=
"~/Scripts/bootstrap-multiselect.js"
></script>
<link href=
"~/css/bootstrap-multiselect.css"
rel=
"stylesheet"
/>
<script type=
"text/javascript"
>
$(
function
() {
$(
'[id*=DDLProductCate]'
).multiselect({
includeSelectAllOption:
true
, buttonWidth:
'213%'
});
});
</script>
@Html.DropDownListFor(
model
=
>
model.ShowAdConfigIDs, ViewData["Products"] as List
<
SelectListItem
>
, new { @
id
=
"DDLProductCate"
, @
class
=
"form-control"
, @
multiple
=
"multiple"
})
How can I do this, inside the same DropDownList's ViewData["Products"] using C# LINQ query ?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to sent mail using smtp config.?
job after a gap