row data with leftjoin data

row data with leftjoin data

montoyammontoyam Posts: 568Questions: 136Answers: 5

I am having an issue getting the selected row data. I can't figure out the correct syntax. Error: 'CategoryID' of undefined

data: function (d) {
    var selected = categoryTable.row({ selected: true });
    if (selected.any()) {
        d.LineItems.CategoryID = selected.data().CategoryID;
    }
}

the error is coming from the right side CategoryID.

I also tried:
d.LineItems.CategoryID = selected.data().Categories.CategoryID;
and
d.LineItems.CategoryID = selected.data().LineItems.CategoryID;

and none of these worked. What is the correct syntax to reference row.data.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,144Questions: 1Answers: 2,586
    Answer ✓

    This sounds similar to this thread - it would be worth look there.

    Colin

  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    Perfect. thank you. However, even though the right side was being identified as the error it was actually the left side that had the issues. But, using the syntax identified in the thread you provided, I was able to get it working:

    d['LineItems.CategoryID'] = selected.data().CategoryID;

This discussion has been closed.