Hi,
I've got a problem i can't figure out... hope someone can help me.
I've got 2 datawindows, both with a dddw inside.
If a choice is made in dddw1, dddw2 is being retrieved with argument of 1.
I want to insert an EMPTY row, because user does not have to select the second. And i want the empty row to be selected.
This code is being triggered on the itemchanged event of this first dropdowndatawindow.
Code:
string Ls_InstNaam, ls_empty
long ll_newrow
ls_empty = ''
datawindowchild dwc_inst1
datawindowchild dwc_Inst2
dw_instantie_naam_2.Reset()
dw_instantie_naam_1.getChild('instantie_instantie_naam_1', dwc_Inst1)
Ls_InstNaam = dwc_inst1.getItemString(dwc_inst1.getrow(), 'instantie_instantie_naam_1' )
// Not a null value
IF Ls_InstNaam <> "" THEN
dw_instantie_naam_2.getChild('instantie_instantie_naam_2', dwc_inst2)
dwc_Inst2.settrans(SQLCA)
dwc_inst2.Reset()
dwc_inst2.retrieve(Ls_InstNaam)
is_instantie_naam_1 = Ls_InstNaam
dw_instantie_naam_2.Retrieve(Ls_InstNaam)
dwc_Inst2.SetItem( dwc_Inst2.InsertRow(1), 'instantie_instantie_naam_2', ls_empty)
// The deselect and seelct part
dwc_inst2.SelectRow(0, FALSE)
dwc_inst2.Scrolltorow(1)
dwc_inst2.SelectRow(1, TRUE)
END IF
Now the empty row isn't (visualy) selected...
does anyone now the answer?
Using PB6.5
I've got a problem i can't figure out... hope someone can help me.
I've got 2 datawindows, both with a dddw inside.
If a choice is made in dddw1, dddw2 is being retrieved with argument of 1.
I want to insert an EMPTY row, because user does not have to select the second. And i want the empty row to be selected.
This code is being triggered on the itemchanged event of this first dropdowndatawindow.
Code:
string Ls_InstNaam, ls_empty
long ll_newrow
ls_empty = ''
datawindowchild dwc_inst1
datawindowchild dwc_Inst2
dw_instantie_naam_2.Reset()
dw_instantie_naam_1.getChild('instantie_instantie_naam_1', dwc_Inst1)
Ls_InstNaam = dwc_inst1.getItemString(dwc_inst1.getrow(), 'instantie_instantie_naam_1' )
// Not a null value
IF Ls_InstNaam <> "" THEN
dw_instantie_naam_2.getChild('instantie_instantie_naam_2', dwc_inst2)
dwc_Inst2.settrans(SQLCA)
dwc_inst2.Reset()
dwc_inst2.retrieve(Ls_InstNaam)
is_instantie_naam_1 = Ls_InstNaam
dw_instantie_naam_2.Retrieve(Ls_InstNaam)
dwc_Inst2.SetItem( dwc_Inst2.InsertRow(1), 'instantie_instantie_naam_2', ls_empty)
// The deselect and seelct part
dwc_inst2.SelectRow(0, FALSE)
dwc_inst2.Scrolltorow(1)
dwc_inst2.SelectRow(1, TRUE)
END IF
Now the empty row isn't (visualy) selected...
does anyone now the answer?
Using PB6.5