jQuery Datatable tabs click event on c# code

jQuery Datatable tabs click event on c# code

MadhuSudhanMadhuSudhan Posts: 4Questions: 2Answers: 0

Hi All,
Can you please help me on the below functionality:
I have 4 Tabs in .aspx page and when user clicks on any of the tab c# code has to be hit and get the latest data and show it in a grid.

Currently the 4 tabs are of Ingrafestic control and has server side click event. I have used the same control and in the server side click event I have used the c# and fetched the Sql Server data and used " ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "function", "CategoryProfileGrid();", false);" in click event and calling the javascript function where i am using the datatable script to bind the grid like below:

function ScheduleAdminGrid()
{
var JSONData = jQuery.parseJSON($("#hdnAdminData").val()); // Here hdnAdminData will have json data of the dataset
document.getElementById("hdnAdminData").value = "";
var columnsAdmin = JSONData.TableColNames;
var dsAdmin = JSONData.TableData;
$("#divAdminPage").html("

");
$Admintable = $('#tblAdminGrid');
//Seeting the Properties
var tblAdmin = $('#tblAdminGrid').DataTable({
"bJQueryUI": true,
"data": dsAdmin,
"columns": columnsAdmin
})

}

Now with out changing this code I want the datatable Tabs to be working.

Can some one please help me on this.

This discussion has been closed.