【029】PostBack事件注册
侧边栏壁纸
  • 累计撰写 60 篇文章
  • 累计收到 2 条评论

【029】PostBack事件注册

秋驰雪隙
2025-04-08 / 0 评论 / 10 阅读 / 正在检测是否收录...

private void RegisterGridCellDataChangedPostBack()
{
    AssociationControl assocControl = new AssociationControl();
    assocControl.SourceServerControl = this.DataGrid8;
    assocControl.SourceControl.EventName = "OnCellDataValueChanged";

    //针对数量和价格这两个列的变化
    ((IUFClientAssoGrid)assocControl.SourceControl).FireEventCols.Add("ItemQty");
    ((IUFClientAssoGrid)assocControl.SourceControl).FireEventCols.Add("Price");

    CodeBlock cb = new CodeBlock();
    UFWebClientGridAdapter gridAdapter = new UFWebClientGridAdapter(this.DataGrid8);
    gridAdapter.IsPostBack = true;
    gridAdapter.PostBackTag = "OnCellDataValueChanged";
    cb.TargetControls.addControl(gridAdapter);
    assocControl.addBlock(cb);
    UFGrid itemGrid = this.DataGrid8 as UFGrid;
    itemGrid.GridCustomerPostBackEvent += new GridCustomerPostBackDelegate(GridCellOnChanged_DoCustomerAction_Grid);

}
0

评论 (0)

取消