GeneXus:没有基表的填充网格

时间:2015-07-08 13:07:06

标签: genexus

我试图在没有基表的情况下填充网格。

事件Load似乎不适用于网格。代码如下:

Event gvRelacionProcesos.Load
    for each
        where vRelacionesProcesosItemCode = &pProducto
        where vRelacionesProcesosCustomerCode = &pCliente   
        &vRelacionesProcesosItemCode = vRelacionesProcesosItemCode
        &vRelacionesProcesosCustomerCode = vRelacionesProcesosCustomerCode
        ...
    endfor
EndEvent

但它没有加载,尝试了一些msg(),但它们也没有显示。

2 个答案:

答案 0 :(得分:0)

您的示例中缺少一些代码,因此我不确定这是否存在问题,但您可能会错过循环内的Load命令。

Event gvRelacionProcesos.Load
    for each
        where vRelacionesProcesosItemCode = &pProducto
        where vRelacionesProcesosCustomerCode = &pCliente   

        &vRelacionesProcesosItemCode = vRelacionesProcesosItemCode
        &vRelacionesProcesosCustomerCode = vRelacionesProcesosCustomerCode
        ...
        Load    \\ This line may be missing
    endfor
EndEvent

答案 1 :(得分:0)

刚发现问题。

我必须这样做 为每个人         其中vRelacionesProcesosItemCode =& pProducto         其中vRelacionesProcesosCustomerCode =& pCliente

    &vRelacionesProcesosItemCode = vRelacionesProcesosItemCode
    &vRelacionesProcesosCustomerCode = vRelacionesProcesosCustomerCode
    ...
    Load    \\ this loads to the grid, goes to mygrid1.load

关于事件加载

然后网格的加载事件(mygrid1.load)正确发生。

无论如何,谢谢。