It sounds like you are pretty new to PB so I'll give you a really simple sample to get you started. Might consider doubleclicked as Terry suggested but clicked will work too.
Assumptions:
- Your datawindow control name is dw_customer_list
- Your column value (key) is named customer_id and is numeric
- Your window name to open is named w_customer_detail
- The value you are passing is a number otherwise use StringParm or PowerObjectParm
- If you are using mdi "sheets" then consider opensheetwithparm instead of openwithparm
In your clicked event of the dw_customer_list add code to grab the key value for whatever you want to display on the window you are opening. If you use a string then use getitemstring instead of getitemnumber
double ld_custid
if IsNull(row) then return 0
if row > 0 and row <= RowCount() then
ld_custid= this.GetItemNumber(row, 'customer_id')
OpenWithParm(w_customer, ld_custid)
end if
And in your w_customer_detail for which you want to display the customer put something like this in the open event to grab the passed parameter and do something with it.
Some other day when you're bored read about the postopen event and why it is good to use.
Also if you were passing a string instead of a number then just use Message.StringParm instead of DoubleParm.
double ld_custid
// grab the passed number parameter
if not IsNull(message.DoubleParm) then
ld_custid= message.DoubleParm
messagebox('Customer ID parameter:', string(ld_custid))
else
// no parmameter!
messagebox('Customer ID parameter:', 'was not passed to window')
end if