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
960
How to call setCellValue for child band row in igHierarchicalGrid?
posted

Hi

[Ignite UI 13.1]

I have an igHierarchicalGrid with two bands.

I want to set a cell value in the child band but I can't figure out the syntax. I know that my igUpdating instance has the method but I can't figure out how to reference the igUpdating instance associated with the child band.

My first band is for tickets, my child band holds the timesheet entries for each ticket.

This will set the IsDirty cell to true in the ticket band (the top level band):

$("#TimesheetGrid").igGridUpdating("setCellValue", ui.rowID, "IsDirty", true);

Now I just need the equivalent for the child band. I have tried many variations but haven't got there yet.

eg

var oColLayouts = $("#TimesheetGrid").igHierarchicalGrid("option", "columnLayouts");
for (var j = 0; j < oColLayouts.length; j++) {
   if (oColLayouts[0].features[j].name == "Updating") {
      oColLayouts[0].features[j].igUpdating("setCellValue", ui.rowID, "IsDirty", true);
   }// Updating ??
}

I have also tried these, without success:

oColLayouts[0].igUpdating("setCellValue", ui.rowID, "IsDirty", true);

oColLayouts[0]("setCellValue", ui.rowID, "IsDirty", true);

I am a bit lost now, not sure what else to try.

Regards,

Graeme Hart

Parents
  • 960
    Offline posted

    I can add the following to the list of things that don't work:

    oColLayouts[0].features[j]("setCellValue", ui.rowID, "IsDirty", true);

    oColLayouts[0].features[j].setCellValue( ui.rowID, "IsDirty", true);


    The code now looks like this, and still doesn't work (the loop wasn't right in teh example above, but that had no bearing on the matter):

    var oColLayouts = $("#TimesheetGrid").igHierarchicalGrid("option", "columnLayouts");
    for (var j = 0; j < oColLayouts[0].features.length; j++) {
       if (oColLayouts[0].features[j].name == "Updating") {
          oColLayouts[0].features[j]("setCellValue",ui.rowID, "IsDirty", true);
       }// Updating ??
    }


    ERROR: TypeError: oColLayouts[0].features[j] is not a function

Reply Children