Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importstring on dddw, data is not sorted as expected

Status
Not open for further replies.

sr100101

Programmer
Mar 26, 2010
1
US
I have column deptno, DropDowndw is the editmode and the datawindow assigned is dddw_dept(columns: deptno,deptname ). In datawindow painter dddw_dept is sorted based on Deptname.

In my program dynamically i am loading the data(using Importstring) into dddw from other source where data is sorted on Deptno.

In runtime , still i could see that data is sorted on DeptNo,not on Deptname. I am expecting that as the datawindow is sorted on Deptname as i mentioned the sorting order as Deptname while designing dddw_dept.

I am just wondering that i am doing some thing wrong or else is this way powerbuilder works(i.e doesn't powerbuilter sorts after the import)

Can some body suggest me that how can acheive the required functionality. Unfortunately i am not supposed to edit the window. I need to do it by using datawindow only.

I tried importing the in the Design mode, data is getting sorted as expected. i.e on Deptname only.

Thanks in advance.


 
After you load the data, set the sort (Setsort method) in the dddw and then use the Sort method.

Matt

"Nature forges everything on the anvil of time
 
mbalent is correct.

use getchild() to get a handle to to your dddw and then do a sort() on the obtained datawindowchild which will be your dddw.
(setsort() should not be necessary since it's already put)

regards,
Miguel L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top