[HOWTO] Edit in header rows in virtual mode |
Post Reply |
Author | ||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
Posted: 07 November 2017 at 4:23am |
|
Hi;
I try to edit header row items when I use a virtual report control in Toolkit 18.0.1. As a starting point I use the CJ "Virtual List Sample". I modified the code by adding those lines to the CVirtualListView::OnCreate function:
In body section the edit control appears, but not in the header section. What's wrong? TIA |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
|
Hello Martin,
I have found what is the reason. Problem was in method CXTPReportControl::EditItem(). It resets pItemArgs->pRow but gets row always from body section. So fixed code is below:
Also you should use separated CVirtualRecord for header or footer sections because callback method for updating CVirtualRecord::UpdateRecordField() don't recognize sections. It used only row and column positions to identify records. Also for separates data sets. However maybe this will useful for you as is. Regards, Oleksandr Lebed
|
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
|
Hi;
I'll try it and come back soon. |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
|
It works , thanks...
When will this be officially released? |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
|
Hi;
Now I have another problem: I have no records in the body section. I'm editing an item in the (only single) header row. That's ok, but when I click into the header item a second time, the text disappears. Moving the focus out of the item without typing, I see the initially entered text again. If the control has records in the body section, the item and edit control behave as expected. Strange! You can reproduce it with the above mentioned sample. |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
|
Hi,
We are testing next release now but without recent changes.
On updating ReportControl the text are taken from DB, so I can suppose that you just don't save changes in DB. See methods CVirtualRecord::UpdateRecordField and CVirtualRecord::GetItemMetrics in sample VirtualList\VirtualListView.cpp My changes in Header section available also after restarting sample. Regards, Oleksandr Lebed |
||
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
|
Strange, but after a full recompile of the Toolkit it works.
TIA |
||
Martin
Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
||
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 |