Hi Ishan,
Thanks for contacting Syncfusion support.
You can use helper to render Rating control within EJ Dialog. To render Dialog as Modal dialog , you can enable the “EnableModal” property. You can set 5 star rating using Value property and get the final rating value with its change event and store it in database based on your scenario.
Refer to the following code.
|
<div class="control">
@{Html.EJ().Dialog("basicDialog").Title("Rate your experience").EnableModal(true).ContentTemplate(
@<div>
@innerContent()
</div>).Width(350).MinWidth(300).MinHeight(125).IsResponsive(true).Render();}
</div>
}
@helper innerContent()
{
@Html.EJ().Rating("orientRating").Value(5).ClientSideEvents(e=>e.Change("onChange"))
}
<script>
function onChange(args) {
console.log(args.value);
}
</script> |
We have attached a sample for your reference in the following link
Now Rating will be rendered within Modal Dialog as shown below
Refer to the below links for more details on these controls
|
Rating |
Dialog |
|
Getting Started |
|
|
|
Demo |
|
|
|
API Reference |
|
|
Please let us know if you need further assistance.
Regards,
Keerthana.