Hi Alex,
Thanks for contacting Syncfusion support.
Query #1:”Record click event is not triggered”
We were unable to reproduce the reported issue at our end and we have prepared a sample based on your code example which can be download from following link,
In this sample, we have rendered the Grid and define the record click event in Grid as well as redirect to another view while we click a Grid row. Please refer to the above sample.
Code example:
|
<ej-grid id="FlatGrid" allow-paging="true" allow-filtering="true" filter-settings="@(new Syncfusion.JavaScript.Models.FilterSettings() { FilterType=FilterType.Excel}) " record-click="recordClick">
. . .
<e-columns>
. . .
</e-columns>
</ej-grid>
<script>
function recordClick(args) {
window.location.rel='nofollow' href = '/Home/Contact/';
}
</script> |
If you still face the same issue, then could you please provide following details?
1) Any script error thrown in console window while click a Grid record? If so, share the screenshot.
2) Please confirm whether record click event name is correct in event definition(record-click=”recordClick”) and function(function recordClick ).
3) Scenario for replication procedure.
4) A sample if possible or modified the given sample as issue reproducible.
Query #2:” for some reason my view didn’t display ”
Missed to refer ScriptManager:
This issue reproduced when we missed to define”ej-script-manager” in _Layout.cshtml page, because ScriptManager is a new script resource manager that helps register JavaScript files. The ScriptManager registers only the Syncfusion.ASP.NET core component script files, otherwise then this the reported issue were not reproduced. So, could you please ensure whether you are defined that ScriptManager is _Layout.cshtml page like as follows,
|
<body>
<div class="container body-content">
<environment names="Development">
<script src="~/lib/jquery/dist/jquery.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
. . .
</environment>
<ej-script-manager></ej-script-manager>
. . .
</div> |
This issue was reproduced also when we don’t define the necessary EJ script files and external script(jQuery, jsrender) and throws the script error in console window. Please refer to the following Help documentation for more information,
Regards,
Venkatesh Ayothiraman.