DataTable Edit Column resort itself when I click on the Edit link.

DataTable Edit Column resort itself when I click on the Edit link.

comicragecomicrage Posts: 12Questions: 2Answers: 0
edited October 2013 in General
Hi,

I applied the datatable to a gridview with has the AutoGenerateEditButton = "true".

When the page loads, everything looks good. However, when I click on any row Edit linkbutton, the selected row resort itself to the bottom. This is an issue if I have 100's of rows and the selected Edit row resort to the bottom and the user have to click to the last page.

Any help is appreciated.

Thanks


var oResultGrid = $("[id$='gvMyData']");
if (fixEmptyDataRow(oResultGrid)) {
var oTable = oResultGrid.dataTable({
"bPaginate": false,
"bFilter": false,
"bInfo": false
});
}
else {
var oTable = oResultGrid.dataTable({
"sPaginationType": "full_numbers",
"aaSorting": [[0, 'asc']],
"sDom": '<"top"lif<"clear">>rt<"bottom"lip<"clear">>',
"aoColumns": [
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": false }
]
});
}

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    What is AutoGenerateEditButton? I don't recognise that option in DataTables. Does the button have an event handler on it or something?

    Allan
This discussion has been closed.