This is a migrated thread and some comments may be shown as answers.

Getting the Parent Row during ComboBox OnChange

0 Answers 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kevin
Top achievements
Rank 1
Kevin asked on 07 Oct 2011, 02:48 AM
I have an parent child grid.  In the child grid I have a ComboBox.  In the OnChange event of that comboBox, I need to lookup the value of something and populate another column in this edited row.  If I already have child rows in this child grid, the following code will work to get the dataItem object of the parent row.  However, if there are no child rows (I am just adding the first row), this does not work.

function ComboBox_OnChangeg(e) 
{
    var comboID = $("#combo").data('tComboBox').value();
    var parentID = row.closest('.t-grid').data('tGrid').data[0].ParentID;  // <--- IS NOT AN OBJECT!!!
 
    // ajax call, blah blah
}

With no child rows in the child grid, how can I get the parent dataItem object and get the value of a column of the parent row?

Remember: This is the OnChange event of a ComboBox in a grid during in-line editing.  This is NOT the OnEdit event of the grid.

Steve
Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Share this question
or