1. EuGrid - How to Return Multiple Row Data
- Posted by euphoric (admin) Dec 10, 2010
- 1276 views
EuGrid experts, Phil Russell, etc...
My grid is EGW_MULTIPLE-enabled, but how do I get the data of the selected rows? I don't see anything akin to EGW_GetDataRow() for multiple rows, and the code for EGW_GetDataRow() isn't multiple-rows ready.
EGW_GetDataRow()
doesn't work to block autoformatting of the CamelCaseText; see problem above ed. jeremy. fixed. (##...## was optional but makes it a fixed width font)
2. Re: EuGrid - How to Return Multiple Row Data
- Posted by Phil.Russell Dec 20, 2010
- 1088 views
Hi CK,
Hmm - I think you've found a missing feature.
Something along the lines of this, possibly?
sequence selected_rows = {} integer row_count = EGW_GetGridCount(grid) if row_count>0 then for row = 1 to row_count do if 1 = EGW_GetDataRowFlags(grid, row, EGW_ROW_SELECTED) then selected_rows &= EGW_GetDataRow(grid, row) end if end for end if
HTH,
Phil
euphoric said...
EuGrid experts, Phil Russell, etc...
My grid is EGW_MULTIPLE-enabled, but how do I get the data of the selected rows? I don't see anything akin to EGW_GetDataRow() for multiple rows, and the code for EGW_GetDataRow() isn't multiple-rows ready.
EGW_GetDataRow()
3. Re: EuGrid - How to Return Multiple Row Data
- Posted by euphoric (admin) Dec 21, 2010
- 1044 views
Thanks, Phil! :)
Here's the final code:
--*------------------------------------------------------* -- EGW_GetDataRowSel: Get selected rows from dataset --*------------------------------------------------------* global function EGW_GetDataRowSel ( integer grid ) sequence selected_rows = {} integer row_count = EGW_GetRowCount(grid) if row_count>0 then for row = 1 to row_count do if EGW_GetDataRowFlag(grid, row, EGW_ROW_SELECTED) = 1 then selected_rows = append(selected_rows,EGW_GetDataRow(grid, row)) end if end for end if return selected_rows end function