ASP.net gridview and datatables working fine apart from when entering editmode
ASP.net gridview and datatables working fine apart from when entering editmode
Hi i have a asp.net gridview and i apply datatables to it and its ok (bar a little visual tweaking).
However when i click on the edit link and send the gridview into 'edit mode', the editable row shifts to the bottom of the list.
I'm thinking this is due to ordering being set on the 'Edit' column and when 'Edit' is clicked the edit mode adds a 'Cancel' link to the cell and therefore throws it to the bottom.
So i tried to remove the sorting ability off that column, with the intention of it not sorting and therefore leaving the row in its place when in 'Edit mode'.
This does not seem to have any effect, am i making some sort of noob error here?
The code i'm using is here:
[code] $(document).ready(function () {
$("#MainContent_gvPSTNResults").dataTable({
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [0] }
],
"bPaginate": false,
"bAutoWidth": false
});
});
[/code]
However when i click on the edit link and send the gridview into 'edit mode', the editable row shifts to the bottom of the list.
I'm thinking this is due to ordering being set on the 'Edit' column and when 'Edit' is clicked the edit mode adds a 'Cancel' link to the cell and therefore throws it to the bottom.
So i tried to remove the sorting ability off that column, with the intention of it not sorting and therefore leaving the row in its place when in 'Edit mode'.
This does not seem to have any effect, am i making some sort of noob error here?
The code i'm using is here:
[code] $(document).ready(function () {
$("#MainContent_gvPSTNResults").dataTable({
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [0] }
],
"bPaginate": false,
"bAutoWidth": false
});
});
[/code]
This discussion has been closed.
Replies
is it possible to not only remove the sorting from the column, but also stop any default sorting on that column also IE absolutely no sorting at all on that column?