5 Replies Latest reply: Jan 12, 2015 12:42 PM by prabhu appu RSS

    Couldn't change the size of the Object using Qliksense .Net SDK

    prabhu appu

      Hi,

       

      I'm trying to resize a text object in Qliksense using .Net SDK. But it is throwing below error.

       

      "Accessing layout property while in suspended layout"

       

      ILocation LocalQliksense = Qlik.Engine.Location.Local;
      
      
      IAppIdentifier foundAppIdentifier = LocalQliksense.AppWithName("Retail Sales");
      IApp application = LocalQliksense.App(foundAppIdentifier);
      
      
      ISheetList sheetlist = application.GetSheetList();
      
      
      var sh = sheetlist.Items.ToList()[0].Info.Id;
      ISheet sheet = application.GetSheet(sh);
      
      
      var text1 = sheet.GetTextImage("MyAutoPlacedText1");
      
      
      using (sheet.SuspendedLayout)
      {
        var text1Cell = sheet.CellFor(text1);
              text1Cell.SetBounds(1, 2, 2, 2);
      }
      
      
      application.DoSave();
      

       

      I just used the code from the below link,

       

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

       

      Please help....

       

      Thanks in Advance

       

      Prabbhu Appu