I have a Repeated that contains a database column defined as a Decimal datatype.
The user is only allowed to enter one of the following values for the column:
     1
     .5
     0

So I made this columns display type a ComboBox, and in the wizard I told it to
populate the Combo by "Use specified values".

That's works fine as long as I set the corresponding values in the "value list"
to:
     1.00
     0.5
for the 1 and the .5.

It's the zero value that's giving me problems. I tried setting its "value list"
value =  0.00, or 0.0 or 0. But none of them work. Arghh!

So then I added code to "force" the ComboBox to display the "0" when applicable.
That didn't work either but most likely my coding approach is wrong. Below is my
code.

Thanks ahead for any advice on how to get this zero working!
Janet

//[[SPIDER_EVENT<Repeated1_onBeforeRowDisplayEvent>
public int Repeated1_onBeforeRowDisplayEvent(CSpDataDrivenVisualEvent event)
{
     double dAlloc = 0;
     int i = event.getRowIndex();

     CSpSelect doSelect = (CSpSelect)CSpider.getDataObject("theDO");

     dAlloc = doSelect.getValue(i, "theColumn").doubleValue();

     if(dAlloc == 0){
            setDisplayFieldValue("*CboAlloc", new CSpString("0"));
     }

     return (PROCEED);
}
//]]SPIDER_EVENT<Repeated1_onBeforeRowDisplayEvent>


_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to