|
Title: Selecting Rows after Merging Cells.... Post by: 2plus2 on May 16, 2013, 09:49:32 AM Howdy...
I have a data grid where I've merged the first two cells, and have "3" rows extending from those merged cells. (see attached image) I'm carrying extra data with each row to populate a form, so when we "edit" the row - I'm trying to iterate through the "3" rows collecting the data I want. Code: function updateDlg(rowIndex) {However, when I try to select rows "#2", and "#3", I only get the first row returned. Is there anyway to select the other two rows if the first cells are merged? Title: Re: Selecting Rows after Merging Cells.... Post by: stworthy on May 16, 2013, 06:38:49 PM A more better way to get rows is calling 'getRows' method, please try code below:
Code: var rows = $('#dgAccounts').datagrid('getRows');Title: Re: Selecting Rows after Merging Cells.... Post by: 2plus2 on May 16, 2013, 06:47:46 PM But I only want the "selected" row and it's two "siblings". Seems like a waste to grab them all, look for the selected row, and the next two that I really want.
Title: Re: Selecting Rows after Merging Cells.... Post by: stworthy on May 16, 2013, 07:54:31 PM Try code below:
Code: var dg = $('#dgAccounts');Title: Re: Selecting Rows after Merging Cells.... Post by: 2plus2 on May 16, 2013, 08:40:36 PM Thanks - that's where I ended up.
Probably not "fixable" but merging the cells plays havoc with some for the datagrid methods. Hope that gets a look at to see if there are more direct ways to get the row data. |