In general, the values that have to be passed in the inline jQuery events could be either "event" or "this". If you would like to pass any other values, they have to be passed as strings:
.ClientHeaderTemplate("<input id='myId_' type='checkbox' onchange='getAllRecords(\"#=Id#\")'>")
It is important to point out that the header row is not associated with and data item. Therefore, the "Id" in the current case will be undefined. And the passed value in the change event handler will probably be "#=Id#" as a string and not as an evaluated template.
Could you share more details on what value would you like to pass to the event handler?
Progress is here for your business, like always. Read more
about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.