Check boxes in a grid

i added a NoYes enum checkbox field in the PriceDiscTable (trade agreement) grid. the grid can hold more than one record for one Item id. i want to restrict the user to choose only one checkbox per itemid, so that checking the box for an item id record will uncheck the box of any other record of the same item id.

thank you.

First go to the design form node and open the Checkbox properites and set the AutoDeclaraition : Yes, and copy the Checkbox name, lets suppose its name is “PriceDiscTable_Checkbox”

Go to the PriceDiscTable form and add a new method as the following:

void CheckBoxes()
{
PriceDiscTable priceDiscTable;
;

priceDiscTable = PriceDiscTable::findRecId(PriceDiscTable.RecId);

PriceDiscTable_Checkbox.enabled(priceDiscTable.CheckBoxEnumField); //your enum field created in price disc table
}

Then go to Datasources then add element.CheckBoxes(); to active method

or PriceDiscTable_Checkbox.enabled(!priceDiscTable.CheckBoxEnumField); //your enum field created in price disc table

Hi Noobish,

thanks for replying!

but i couldnt understand the many to one association between the itemid and the checkbox.enable().

can you please explain what this method would exactly do?

Thanks again =]