i have a bug where i can bind the data to the grid on the first level and the second level, but the third level takes the data of the second level
http://jsfiddle.net/w4ehc9r4/
Can you please help me?
Hello Ghawi,
Thank you for posting in our community and for your provided sample.
After I investigated this matter further I determined that the reason for this behavior is in your columnLayouts definition. The third layout should be defined as an option to the second one however in your sample they are both defined as an options to the parent layout. I moved the third layout as an option of the second and your sample is working as expected:
columnLayouts: [{ key: "level1list", responseDataKey: "Data", autoGenerateColumns: false, primaryKey: "ID", columns: [{ headerText: "ID", dataType: "number", key: "ID" }, { headerText: "fullname should be level 1", dataType: "text", key: "FullName" }], columnLayouts: [{ key: "level2list", responseDataKey: "Data", autoGenerateColumns: false, autofitLastColumn: true, columns: [{ headerText: "full name should be level 2", dataType: "text", key: "FullName" }] }] }]
Your modified sample could be found at : http://jsfiddle.net/w4ehc9r4/1/
I believe you will find the following article from our documentation helpful:
Columns and Layouts(igHierarchicalGrid)
Please let me know if you need any further assistance with this matter.
Hello Vasya,
I did not see a difference in the code you updated. The code is the same in the two samples. i put the column layout of the third grid inside the column layout of second grid just like you said.
Also, the problem i told you about was not solved in your sample
if you look carefully, the third grid's content is "level 1", while it should be "level 2" as specified in the data
it seems as if the third grid is taking the datasource of the second grid
Thank you for your help
Hello Marc,
Here is a sample which modifies the data when assigning it to the grid data source http://jsfiddle.net/w4ehc9r4/3/
It is not modifying the data and it makes the correct structure which the hierarchical grid expects.
Hello vasya,
this is not an acceptable solution for me because i am forced to use this datasource format in the project i am working on
Why is it that the second grid would take the correct "responceDataKey" while the third grid won't
Thank you for getting back to me.
I modified you data source a bit since it was not in the correct format and this sample is working as expected. I am attaching your modified sample for your reference.
Please have a look at this sample and let me know if you have any additional questions afterwards.