I have a two level grid, child rows have a column for the foreign key (CategoryId), after a child row is added I want to set its value (it is done automatically when the parent row already exist but it doesn't if parent is new too), for example:
$(document).delegate("#MyGrid", "iggridupdatingrowadded", function (evt, ui) { var parentRow = $(ui.owner.element).parents("tr[data-container='true']").prev("tr"); var parentKey = $(parentRow).data("id"); ui.values["CategoryId"] = parseInt(parentKey);}
The problem with this is that the value is null when it is accessed with dataview.
How to set the value for a foreign key and then see it with dataview?
BTW, I have tried this too:
$(document).delegate("#MyGrid", "iggridupdatingrowadded", function (evt, ui) { var parentRow = $(ui.owner.element).parents("tr[data-container='true']").prev("tr"); var parentRowGrid = $(parentRow).closest("table"); var parentKey = $(parentRow).data("id"); if (parentRowId != undefined) { $($(parentRowGrid.context).attr("id")).igGridUpdating("setCellValue", ui.values["Id"], "CategoryId", parseInt(parentKey)); }}
This was answered here http://es.infragistics.com/community/forums/p/93201/461387.aspx#461387
Hello Luis,
Thank you for posting in our community and sharing your experience with the other members.
If you need further assistance regarding this matter, please let me know.
Regards,
Tsanna