Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

.NET SDK SuspendLayout/ResumeLayout

Hi,

I've seen a few code samples with SuspendLayout and ResumeLayout method calls...

what are they for?

Thanks,

Shane.

1 Solution

Accepted Solutions
prabhuappu
Creator II
Creator II

Hi Shane,

https://help.qlik.com/sense/en-us/developer/#../Subsystems/NetSdk/Content/HowTos/NetSdk_WorkWith_Gen...

When working with generic objects in a shared session environment, changes in one client propagate to all other clients as well. This invalidates all objects and triggers automatic fetching of the properties and layout the next time they are being accessed.

To synchronize this with your code, you can delay a possible invalidation until after you have made your changes to the generic object.

There are two ways to do this:

  • With a using block
  • Explicitly suspending and resuming layout

I hope this clarifies your doubt....

Regards,

Prabhu Appu

View solution in original post

2 Replies
prabhuappu
Creator II
Creator II

Hi Shane,

https://help.qlik.com/sense/en-us/developer/#../Subsystems/NetSdk/Content/HowTos/NetSdk_WorkWith_Gen...

When working with generic objects in a shared session environment, changes in one client propagate to all other clients as well. This invalidates all objects and triggers automatic fetching of the properties and layout the next time they are being accessed.

To synchronize this with your code, you can delay a possible invalidation until after you have made your changes to the generic object.

There are two ways to do this:

  • With a using block
  • Explicitly suspending and resuming layout

I hope this clarifies your doubt....

Regards,

Prabhu Appu

Not applicable
Author

Hi Prabhu,

thanks for that

Shane.