Server-Side Processing
Server-Side Processing
Hi,
I am busy implementing the datatables plugin on an asp.net GridView table.
I make use of the two datatable "Extras" ColVis and ColReorder.
I am already sorted with the server-side processing
Source: http://activeengine.net/tag/datatables-net-paging/
The problem comes in when the table is rendered,
Previously I had a template field in my GridView with 4 fields inside, 3 image fields and a normal data field
[code]
[/code]
The three images are set according to the boolean fields, if it is true then use the one image else the other
Note that the boolean fields are not shown as columns in the data table, only the link lable JobNo
I have tried including the boolean fields in the table and using them via "aoColumnDefs"
[code]
"aoColumnDefs": [
{ "fnRender": function (oObj) {
return "
" + oObj.aData[0] + "
";
},
"sName": "JobNo",
"bSearchable": true,
"bSortable": true,
"bVisible": true,
"aTargets": [0]
},...
[/code]
But the problem with this is that the ColVis still lists the boolean fields and therefore it is not plausable.
The bVisible doesnt hide them from the selectable fields with ColVis
Is there a way to pass the datakeys from the server and use them within aoColumnDefs without actually rendering them clientside in the table first?
Thank you for the help in advance
I am busy implementing the datatables plugin on an asp.net GridView table.
I make use of the two datatable "Extras" ColVis and ColReorder.
I am already sorted with the server-side processing
Source: http://activeengine.net/tag/datatables-net-paging/
The problem comes in when the table is rendered,
Previously I had a template field in my GridView with 4 fields inside, 3 image fields and a normal data field
[code]
[/code]
The three images are set according to the boolean fields, if it is true then use the one image else the other
Note that the boolean fields are not shown as columns in the data table, only the link lable JobNo
I have tried including the boolean fields in the table and using them via "aoColumnDefs"
[code]
"aoColumnDefs": [
{ "fnRender": function (oObj) {
return "
" + oObj.aData[0] + "
";
},
"sName": "JobNo",
"bSearchable": true,
"bSortable": true,
"bVisible": true,
"aTargets": [0]
},...
[/code]
But the problem with this is that the ColVis still lists the boolean fields and therefore it is not plausable.
The bVisible doesnt hide them from the selectable fields with ColVis
Is there a way to pass the datakeys from the server and use them within aoColumnDefs without actually rendering them clientside in the table first?
Thank you for the help in advance
This discussion has been closed.
Replies
Allan
This will be the exact outcome!
Thank you once again for your awesome work