Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
antrtiz001
Partner - Contributor III
Partner - Contributor III

.NET SDK Sheet.CreateChild<Pivotable> vs Sheet.CreatePivottable

Hi everybody,

I use .NET SDK to automatically create  visal objects in Qlik Sense Apps.

Everything worked fine until I moved to the latest release of th library (16.2).

The methods like Sheet.CreatePivottable disappeared and I found a Sheet.CreateChild<T> where T can be Pivottable.

When I run the code,



_Sheet.SuspendLayout();

//IPivottable pvt = _Sheet.CreatePivottable(tableId, tProp);
tProp.Info.Id = tableId;
IPivottable pvt = _Sheet.CreateChild<Pivottable>(tProp);
_Sheet.ResumeLayout();

the table is created (when I run again the code the id already exists) but it is not shown.

Could you please give me some advices?

Thanks in advance

Antonio

Labels (3)
4 Replies
Øystein_Kolsrud
Employee
Employee

I assumed you upgraded from a different major release of the .NET SDK? A lot of functionality emulation client behavior was removed from the SDK in that release. In your case you are probably affected by this this change:

REMOVED: Removed deprecated sheet specific overrides for DidCreateChild and DidDestroyChild. Deprecated since v15.3.0.

You will have to manually do the correct changes to the properties of the sheet object in order to make it visible in the client. Unfortunately, this part of the Qlik Sense behavior is not currently officially documented and is not considered part of the API (which is also why it's been removed from the .NET SDK). The best option to achieve what you want to do is therefore probably to reverse engineer what the client is doing.

Full release notes can be found here:

https://help.qlik.com/en-US/sense-developer/May2022/Subsystems/NetSDKAPIref/Content/ReleaseNotes.htm

antrtiz001
Partner - Contributor III
Partner - Contributor III
Author

Thanks Øystein_Kolsrud,

as I understand, I can check a layout of a hand-created pivot table against the program-created.
Is it what you meant?

 

Antonio

 

Øystein_Kolsrud
Employee
Employee

Yes, though you probably want to look at the properties, not the layout. And in this case you want to look at the properties of the sheet, not the pivot-table. When adding an object to a sheet, the properties of that sheet needs to be updated so that a cell contains the relevant visualization.

I typically use this tool for this type of property exploration:

https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Explorer-for-Developers/ta-p/1949809

antrtiz001
Partner - Contributor III
Partner - Contributor III
Author

Thanks Øystein_Kolsrud,

I'll check

Antonio