Symptom
Difference in behavior from PowerBuilder 12.6 Classic and PowerBuilder 12.6 .NET, when using SetItem() in the ItemChanged event:
PowerBuilder 12.6 Classic shows:
//application Open event
grid = create n_datastore
grid.DataObject = "d_state"
ll_row = grid.InsertRow(0)
grid.SetColumn("state")
ls_col = grid.GetColumnName()
grid.SetText("PA")
grid.AcceptText()
//ItemChanged Event
ls_OrigTextValue = this.gettext() <-- value is PA
ls_OrigItemvalue = this.GetItemString(1, "state") <-- value is null;
This.SetItem(row, "state", "")
this.SetText("NJ")
li_rc = this.AcceptText()
ls_NewItem = this.GetItemString(1, "state") < -- value is NJ
ls_NewText = this.gettext() <-- value is NJ
li_rc = this.deleterow(1)
li_rc = this.insertrow(0)
this.SetColumn("state")
this.SetText("NJ")
This.SetItem(row, "state", "NJ")
ls_NewItem = this.GetItemString(1, "state") < value is NJ
ls_NewText = this.gettext() <---value is NJ
return 1
// application open event
.
.
ls_NewText = grid.GetText() <-- value is NJ
ls_NewValue = grid.GetItemString(1, "state") <--value is NJ
PowerBuilder 12.6 .NET shows:
//application Open event
grid = create n_datastore
grid.DataObject = "d_state"
ll_row = grid.InsertRow(0)
grid.SetColumn("state")
ls_col = grid.GetColumnName()
grid.SetText("PA")
grid.AcceptText()
//ItemChanged Event
ls_OrigTextValue = this.gettext() <-- value is PA
ls_OrigItemvalue = this.GetItemString(1, "state") <-- value is null
This.SetItem(row, "state", "")
this.SetText("NJ")
li_rc = this.AcceptText()
ls_NewItem = this.GetItemString(1, "state") <-- value is ""
ls_NewText = this.gettext() <-- value is NJ
li_rc = this.deleterow(1)
li_rc = this.insertrow(0)
this.SetColumn("state")
this.SetText("NJ")
This.SetItem(row, "state", "NJ")
ls_NewItem = this.GetItemString(1, "state") <-- value is NJ
ls_NewText = this.gettext() <--value is NJ
return 1
// application open event
.
.
ls_newText = grid.GetText() <-- value is NJ
ls_newValue = grid.GetItemString(1,"state") <-- value is PA
Read more...
Environment
- SAP PowerBuilder 12.6 .NET (build 4081)
Product
Keywords
powerbuilder,pb,.net,settext,settext(),itemchangedpb,setitem,classic,.net,itemchanged , KBA , BC-SYB-PB , PowerBuilder , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview