How to:Get Item after re-sorting. |
Post Reply |
Author | |
Glaber8
Newbie Joined: 02 December 2016 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 02 December 2016 at 4:15am |
Dear CJ Team:
Here is the problem I have: I created 5 records (1,2,3,4,5) with 3 columns in report control, after clicking any columns headers, the records will resorted. However the retrieved item is always in the inserted sequence rather than the item from the resorted index. I suppose this is quite a easy issue and appreciated if your team could show me some tips to solve this. Cheers.
|
|
Glaber8
Newbie Joined: 02 December 2016 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
I still don't make myself clear, d better show a example like this:
//----------Code--------------- //Inserting new record. //... m_wndReportCtrl.AddRecord(new CReportRecord(i)); MFC: -----------Report Control------------------ | 1 | Yes | ... | 2 | Yes | ... | 3 | No | ... -------------------- //Click any column head, the row will resort: -----------Report Control------------------ | 3 | Yes | ... | 2 | Yes | ... | 1 | No | ... -------------------- //Right now if I would like to use: (assume the focused row is third row " 1 | No | ...".) int nSelRow = m_wndReportCtrl.GetSelectedRowIndex(); m_wndReportCtrl.GetItemText(nSelRow, 0); //will get the " 3 | Yes | ..." record rather than " 1 | No | ..." |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |