Hi Greene,
Thanks for contacting Syncfusion support.
We created a sample and in this sample we have rendered the dropdown control with data source and dropdown data source value is based on the Grid theme name (eg. flat-saffron, flat-lime, etc.). If we change the theme name, then the corresponding theme will appear in the Grid.
Refer to the code example and sample,
Code example:
<Dropdown>
@Html.EJ().DropDownList("DropDownList1").Datasource((IEnumerable<object>)ViewData["LocalDataSource"]).DropDownListFields(Df => Df.Text("Text")).ClientSideEvents(e=>e.Change("change"))
<GRID>
@(Html.EJ().Grid<object>("FlatGrid")
.Datasource((IEnumerable<object>)ViewBag.datasource)
.AllowPaging() /*Paging Enabled*/
.SelectionType(SelectionType.Single)
.AllowResizing()
.AllowFiltering()
.Columns(col =>
{
. . .
}))
</div>
<Change Event>
<script>
function change(args) {
var link = window.document.getElementsByTagName('link'); //get the link of css file
var value = args.value; // get the dropdown value
$(link).attr('rel='nofollow' href', "/Content/ej/web/" + value + "/ej.web.all.min.css") // Change the theme
}
</script>
|
Note: The corresponding content folder will be in following structure.
Structure:
Regards,
Prasanna Kumar N.S.V