Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
how to resolve Primary foreign key issue
posted

//
function dropTree() {

$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "IgTree.aspx/GetTree",

data: {},
success: function (data) {
if (data.d != null && data.d[0] != null) {
if (data.d[0] != null) {
PopulateGridWoSorting("Tree", data.d);
debugger;
};

};
}, error: function (data) {
alert("failed posted data");
}

});

function PopulateGridWoSorting(iid, data) {
debugger;
$('#' + iid).igTreeGrid({
dataSource: data[1], primaryKey: "id",
foreignKey: "ParentId",
//responseDataKey: "results",
dataSourceType: "json",
autoGenerateColumns: false,

 columns: data[0],


});


};

};


// ]]>

i am getting data from database through datatable 

i works when i simply bind grid but

when i uncomment primary and foreign key data get hide except header  and no error occur ....


  • 15320
    Offline posted

    Hello taha,

    Please share your data that is returned from the server, so that I can see it and decide if your treegrid configuration is correct and what should be changed in order to work properly.

    Regards,

    Tsanna