简体   繁体   English

Delphi 7-TMS Intraweb数据库感知网格

[英]Delphi 7 - TMS Intraweb DB-aware Grid

I'm making a web application by using Delphi 7 and TMS suite for Intraweb. 我正在使用用于Intraweb的Delphi 7和TMS套件制作Web应用程序。 I have several client dataset components and I use a TTIWDBAdvWebGrid for showing the data. 我有几个客户端数据集组件,并且使用TTIWDBAdvWebGrid来显示数据。 TTIWDBAdvWebGrid is a data-aware component, but when I modify some values in grid, the data is not persistent(on cell events the value of the cell is the old one, not the value set by me). TTIWDBAdvWebGrid是一个数据感知组件,但是当我修改网格中的某些值时,数据不是持久性的(在单元事件中,单元的值是旧的,而不是我设置的值)。

any ideas? 有任何想法吗?

it seems that the event is not triggered well.also, the OnDirectEditUpdate event does not occur. 似乎该事件未很好地触发。此外,不会发生OnDirectEditUpdate事件。
the following code(put in ClientEvents->EditDone) is solving the problem: 下面的代码(放在ClientEvents-> EditDone中)解决了这个问题:

if (IsEditing(obj))
{
valedt =GetEditValue(IWDBECRITCOUPLESObj,c,r);
i = GetEditRow(IWDBECRITCOUPLESObj);
SetEditValue(IWDBECRITCOUPLESObj,8,i,valedt);
}

after this, the value is set on the dataset. 之后,在数据集上设置值。

IWDBECRITCOUPLES is the name of the grid component on the form. IWDBECRITCOUPLES是表单上网格组件的名称。 GetEditValue and SetEditValue have the parameters gridname(followed by Obj suffix), column, row and Value(only SetEditValue function) GetEditRow has the parameter gridname(followed by Obj) GetEditValue和SetEditValue具有参数gridname(后跟Obj后缀),列,行和Value(仅SetEditValue函数)GetEditRow具有参数gridname(后跟Obj)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM