Template is not yet rendered when the client side event for "Create" is called

I have an EJGRID in my ASP NET MVC 5 web app. 

  • I have a grid with a column which has the following template
<script id="DescriptionColumnTemplate" type="text/x-jsrender">
    <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect">
        <input type="checkbox"  class="js-addendum-grid-checkbox">
    </label>
</script>

  • I have added the following for capturing the "Create" client side event
.ClientSideEvents(eve =>
{
     eve.Create("onActionComplete");
})
  • The JavaScript function does the following:
function onActionComplete(args) {
    console.log($(".js-addendum-grid-checkbox").length);
}

When displayed the Grid has more than one row displayed. Each row having a checkbox with the css class "js-addendum-grid-checkbox" as in the above template. But the the "onActionComplete" function is called, no checbox is found in the grid. 

QUESTION: When the client side event is called, the template for the column is not rendered yet?

1 Reply

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team May 21, 2020 12:26 PM UTC

Hi Suraj, 

Thanks for contacting Syncfusion Support. 

Query#:- when the client side event is called, the template for the column is not rendered yet? 

We have prepared sample as per your code example but we are unable to reproduce the problem(Create event triggered) at our end. Refer to the sample Link:- 

Refer to the Demo and Documentation Link about ColumnTemplate:- 

Ensure that you have followed the sample and Demo properly. We need some more additional details to find the cause of the issue. Share us the following details. 

  1. Complete Grid code example(Client and Server).
  2. Screenshot/Video Demo to replicate the issue.
  3. Is checkbox render at your end in Template column. Share Screenshot.
  4. Product version details.

Regards, 
Farveen sulthana T 


Loader.
Up arrow icon