1. EuGrid - How to Return Multiple Row Data

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) 

new topic     » topic index » view message » categorize

2. Re: EuGrid - How to Return Multiple Row Data

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()

new topic     » goto parent     » topic index » view message » categorize

3. Re: EuGrid - How to Return Multiple Row Data

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 
new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu