mRender: Render an ASP Server Control

mRender: Render an ASP Server Control

DoltscheDoltsche Posts: 9Questions: 0Answers: 0
edited May 2013 in General
Dear Community,

Since several hours I'm trying to achieve the mRender function of the aoColumnDefs to render an ASP Server Control, which has a dynamic value attribute. The reason why it has to be an ASP Server Control is because the rendered button must call a server-side event.

All I came up so far is the following, which doesn't work well:

[code]{
"bSortable": false,
"aTargets": [8],
"mData": 8,
"mRender": function (data, type, full) {
var editButton = '';
$(editButton).val(data);
return editButton;
}
[/code]

The button itself will be generated in each row as the following output shows:

[code]

[/code]

Unfortunately, the jQuery val() method does actually not change the value of the control. I've also tried with .attr() and .prop(). All of them do not set the value property of the input control.

Apparently, my method to achieve my goal doesn't work at all. So I'm looking further for your ideas on how I can generate an ASP Server Control within the mRender function of all dataTables rows. The reason for that is the necessity to fire a server-side asp event. Or do I have reached a point where I can't use dataTables with ASP.NET without excessive tinkering?

Best regards

Samuel
This discussion has been closed.