Hi experts,
I'm trying to capture dataRendered or rowsRendered event of an inner grid, but no one fried. What i'm doing wrong? Please take a look at the underscore lines. Thanks in advance.
$("#hierarchicalGrid").igHierarchicalGrid({ width: "100%", dataSource: data, //Array of objects defined above autoGenerateLayouts: false, childGridCreated: function (evt, ui) { debugger; alert('aa'); }, childrenPopulated: function (evt, ui) { debugger; alert('bb'); }, columns: [ { headerText: "Food", key: "Food" } ], columnLayouts: [{ key: "Products", autoGenerateColumns: false, columns: [ { headerText: "Name", key: "Name" }, { headerText: "Quantity", key: "Quantity" } ], rowsRendered: function (evt, ui) { debugger;//not fired }, dataRendered: function (evt, ui) { debugger;} }] });
Hello Tsanna,
You are right, the events are for the whole grid container.
Hello Ming,
As I've already explained you, these events are related to the whole grid container, not to a specific layout level. If you want to access the inner grid data, you may access it through dataSource reference on dataRendered event using for example the following code: ui.owner.dataSource.data()[0]["Products"]. Please note that this code snippet is based on the following sample: http://www.igniteui.com/hierarchical-grid/overview If you have any further questions, feel free to contact me.
Regards,
Tsanna
Hi Tsanna, Thank you for your reply. What i'm trying to do is to capture the inner grid's rowsRendered and dataRendered event.
Please note that these events are meant to be attached directly to the grid widget initialization. They're related to the whole grid container, not particularly to some layout. Therefore you should define them outside the columnLayouts definition. What are you trying to achieve using these events? I assume that you want to achieve child layout data. Is that your case? Please give me more details around your scenario. Waiting for your response.