开发者

PowerBuilder DataWindow

I have created a DataWindow (Freeform). All the fields I have selected are displayed in the header part of the DataWindow. I have just changed the background color and border style of each field. But I am not able to enter anything in the fields at run time.

I have write the below code to insert a record to make the fields editable.

setpointer(HourGlass!)
This.set开发者_如何转开发trans( SQLCA )
This.Reset()
This.InsertRow(0)


Columns in the header are not editable; they need to be in the Detail band to be editable.

Maybe you could add to your post to describe what you are trying to accomplish. I suspect part of the solution may be to have columns in the detail band with expressions that only let them be visible on the first row, but I'm just speculating. A second DataWindow is another possibility.

Good luck,

Terry


One thing to check is to make sure that your columns don't have their tab order set to 0. If a column has it's tab order set to zero, the user won't be able to edit data in that column. You can check this in the datawindow painter by going to the Format menu and selecting Tab Order. If any of your columns have a zero in red above them, you can change it to another number by clicking on it and typing a new (non-zero) number. Once you're done, go to the Format menu and select Tab Order again to get out of editing mode.


Suppose you want to enter a value to a field whose name is X. Then, to enter a value, use the following syntax -

long ll_row
ll_row = this.insertRow(0)
this.object.X[ll_row] = value

If you are still having trouble, or I misunderstood you, then comment back on this answer.


Columns in the header are not editable; they need to be in the Detail band to be editable. header band just for column names to be shown in data window as column separators if you want to enter data and to make the fields as input takers .you need to define them in detail Band.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜