Re: EuGrid Issues

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jonas Temple wrote:
> cklester wrote:
> > Anybody know why the line below would be failing?
> > 
> > if not EGW_AddColumn(newGrid,name,140,EGW_FIRST,EGW_STATIC,1) then ?1/0 end
> > if
> > if not EGW_AddColumn(newGrid,"Cost",70,EGW_LAST,EGW_STATIC,2) then ?1/0 end
> > if
> > if not EGW_AddColumn(newGrid,"Ref",70,EGW_LAST,EGW_STATIC,3) then ?1/0 end
> > if
> > -- fails next line
> > if not EGW_SetColumnProperty(newGrid,3,EGW_COL_DATATYPE,EGW_NUMBER) then
> > ?1/0 end if
> > if not EGW_SetColumnProperty(newGrid,3,EGW_COL_NUMFORMAT,"%d") then ?1/0 end
> > if
> > 
> Maybe try...
> 
> atom col1 = EGW_AddColumn(newGrid,name,140,EGW_FIRST,EGW_STATIC,1)
> atom col2 = EGW_AddColumn(newGrid,"Cost",70,EGW_LAST,EGW_STATIC,2)
> atom col3 = EGW_AddColumn(newGrid,"Ref",70,EGW_LAST,EGW_STATIC,3)
> atom void = EGW_SetColumnProperty(newGrid,col3,EGW_COL_DATATYPE,EGW_NUMBER)
> void EGW_SetColumnProperty(newGrid,col3,EGW_COL_NUMFORMAT,"%d")
> 
> I think the problem is when you assume that the third column is 
> actually column id 3.  It makes sense logically but that's not how it works.

Jonas, thanks! You are correct. I thought it wanted the column NUMBER, not
a column ID. Oops. :)

-=ck
"Programming in a state of EUPHORIA."
http://www.cklester.com/euphoria/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu