How to manipulate Datawindow without using datawindow functions.
|
// I test only on PowerBuilder 6.5 build 444 long ll_dw_handle ll_dw_handle = handle(dw_1)
Function
|
Power script
|
Retrieve |
Post(ll_dw_handle, 1306, 0, 0) Post(ll_dw_handle, 1320, 0, 0) |
ScrollNextPage |
Post(ll_dw_handle, 1318, 0, 0) |
ScrollPriorPage |
Post(ll_dw_handle, 1319, 0, 0) |
ScrollToFirstPage |
Post(ll_dw_handle, 1315, 0, 1) // 1 = first row? |
ScrollToLastPage |
Post(ll_dw_handle, 1315, 0, 99999999) // 99999999 = last page ? pb6 programmer don't know how to get the last page :) |
Sort Dialog |
Post(ll_dw_handle, 1309, 0, 0) |
Filter Dialog |
Post(ll_dw_handle, 1311, 0, 0) |
DeleteRow |
Post(ll_dw_handle, 1357, 0, 0) Post(ll_dw_handle, 1307, 0, 0) |
Append Row |
Post(ll_dw_handle, 1357, 0, 0) Post(ll_dw_handle, 1312, 0, 0) Post(ll_dw_handle, 1315, 0, dw_1.rowcount() + 1) Post(ll_dw_handle, 1325, 0, 0) |
InsertRow |
Post(ll_dw_handle, 1357, 0, 0) Post(ll_dw_handle, 1313, 0, 0) Post(ll_dw_handle, 1312, 0, dw_1.getrow()) Post(ll_dw_handle, 1315, 0, dw_1.getrow()) Post(ll_dw_handle, 1325, 0, 0) |
Update |
Post(ll_dw_handle, 1357, 0, 0) Post(ll_dw_handle, 1338, 0, 0) Post(ll_dw_handle, 1304, 0, 0) |
SaveAs Dialog |
Post(ll_dw_handle, 1338, 0, 0) Post(ll_dw_handle, 1305, 0, 0) |
Print |
Post(ll_dw_handle, 1303, 0, 0) |
Retrieve (yield) |
Post(ll_dw_handle, 1306, 1, 0) Post(ll_dw_handle, 1320, 0, 0) |
Cancel |
Post(ll_dw_handle, 1320, 0, 0) |
|