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
420
Cannot Get The Grid To Work....
posted

"Uncaught Error: There was an error parsing the JSON data and applying the defined data schema: The input data doesn't match the schema, the following field couldn't be mapped: MyKeyGuid"

I receive this error no matter what I do/set....what can I do here? 

My Data:

{"Table":[{"MyKeyGuid":"9eb191d8-14bf-4159-b8a6-5da004afbc15","Name":"TestTitle","Agent":"TestData"}],"Table1":[{"OwnerGuid":"9eb191d8-14bf-4159-b8a6-5da004afbc15","Trxid":43182,"TrxDate":"2005-11-01T00:00:00","Rent":383.9874,"Suspended":false},{"MyKeyGuid":"9eb191d8-14bf-4159-b8a6-5da004afbc15","Trxid":71455,"TrxDate":"2017-05-01T00:00:00","Base":420.0240,"Suspended":false}]}

My Code (I have quite a bit commented out just to try and make this work.)

$("#myGrid").igHierarchicalGrid({

key: "Table",
width: "100%",
dataSource: data,
dataSourceType: "json",
//responseDataKey: "results",
autoGenerateColumns: false,
autofitLastColumn: false,
primaryKey: "MyKeyGuid",
columns: [
{ key: "MyKeyGuid", headerText: "KeyGuid", dataType: "string", width: "20%" },
{ key: "Name", headerText: "First Name", dataType: "string", width: "20%" },
{ key: "Agent", headerText: "Title", dataType: "string", width: "20%" }
],
autoGenerateLayouts: false,
columnLayouts: [
 {
 key: "Table1",
 autoGenerateColumns: false,
 autofitLastColumn: false,
 primaryKey: "MyKeyGuid",
 width: "100%",
 dataSource: data,
columns: [
{ key: "Trxid", headerText: "Trx", dataType: "number", width: "0%", hidden: true },
 { key: "MyKeyGuid", headerText: "MyKey", dataType: "string", width: "20%" },
 { key: "TrxDate", headerText: "TrxDate", dataType: "string", width: "20%" },
 { key: "Rent", headerText: "Rent", dataType: "string", width: "20%" },
 { key: "Suspended", headerText: "Suspended", dataType: "string", width: "0%", hidden: true }
 ]

});