TileView not laying out properly

39 posts, 0 answers
  1. derrick
    derrick avatar
    21 posts
    Member since:
    Sep 2009

    Posted 23 Nov 2009 Link to this post

    Hi,

    When I programattically add contents (RadFluidContentControls with textblocks as a test) to the RadTileView, the contents do not update correctly.  Resizing the window or clicking on an item causes it to update the layout correctly.  I need to know how to force the RadTileView to update its layout to correct this error.  (See pictures attached).  I'm using the Nov03 version, btw.

    Thanks,

    Derrick

        private void LoadPod(XElement Pod)
        {
          string Name = utils.GetAttributeValue(Pod, "Name");
          RadTileViewItem pod = new RadTileViewItem();
          //header
          pod.Header = Name;
          //
          RadFluidContentControl fcc = new RadFluidContentControl();
          fcc.NormalToSmallThreshold = new Size(300, 300);
          fcc.NormalToLargeThreshold = new Size(301, 301);
          fcc.LargeToNormalThreshold = new Size(302, 302);
          pod.Content = fcc;
          //
          TextBlock small = new TextBlock();
          small.Text = "small";
          fcc.SmallContent = small;
          //
          TextBlock norm = new TextBlock();
          norm.Text = "normal";
          fcc.Content = norm;
          //
          TextBlock large = new TextBlock();
          large.Text = "large";
          fcc.LargeContent = large;
          //
          this.Pods.Items.Add(pod);
        }
  2. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 24 Nov 2009 Link to this post

    Hi Derrick,

    Thank you for your feedback. This is a known issue on which we are working. The problem should be resolved for the upcoming service pack which is due in the beginning of December.

    Kind regards,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. derrick
    derrick avatar
    21 posts
    Member since:
    Sep 2009

    Posted 24 Nov 2009 Link to this post

    Thank you.  I've also noticed a couple other issues you might want to know about for the next release.  The FluidContentControl is sometimes oscillating between Small and Normal.  (Rapidly switching between the two contents endlessly).  Seems to only happen when the tiles are in the minimized state.  I've tried it with several different threshold sizes.  Also, I've seen them show the wrong content for their size a number of times. 
  5. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 25 Nov 2009 Link to this post

    Hi Derrick,

    The fast switching in the FluidContentControl may be caused by your specific threshold values. Can you please provide an example that demonstrates the problem so that I can investigate? We are not aware of current bugs in the thresholds.

    Greetings,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. derrick
    derrick avatar
    21 posts
    Member since:
    Sep 2009

    Posted 25 Nov 2009 Link to this post

    Hi,

    I've tried several different sets of threshold values, including the one in my original post, and these settings:

          RadFluidContentControl fcc = new RadFluidContentControl();
          fcc.NormalToSmallThreshold = new Size(200, 200);
          fcc.NormalToLargeThreshold = new Size(201, 201);
          fcc.LargeToNormalThreshold = new Size(302, 302);

    I'm putting a RadChart in the tiles, and want it to be something else if the tile is too small to display correctly.

    Thank you,

    Derrrick
  7. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 30 Nov 2009 Link to this post

    Hi Derrick,

    In the code snippet you provided I see that you're setting only three of the four threshold values which means the threshold you don't set gets an automatic value which may be causing the problem. Another problem may be the actual size of the content you want to switch with these thresholds - have you checked what is the actual size (and thus are the threshold values correct) of the content you want to swap? Sometimes when you don't hard code the size of your elements it may be tricky to determine the actual size with which they're rendered. You may need to check their size at runtime.

    Alternatively, you can swap the visible content of the FluidContentControl manually as the tile states change. To do that, you need to set the ContentChangeMode of the FluidContentControl to "Manual". Also, you should attach to the TileStateChanged event of the TileView and do the following:

    private void tileView_TileStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
    {
     RadTileViewItem item = e.Source as RadTileViewItem;
     if (item != null)
     {
      RadFluidContentControl fluidControl = item.ChildrenOfType<RadFluidContentControl>().First();
      if (fluidControl != null)
      {
       switch (item.TileState)
       {
        case TileViewItemState.Maximized:
         fluidControl.State = FluidContentControlState.Large;
         break;
        case TileViewItemState.Minimized:
         fluidControl.State = FluidContentControlState.Small;
         break;
        case TileViewItemState.Restored:
         fluidControl.State = FluidContentControlState.Normal;
         break;
       }
      }
     }
    }


    Let me know if any of the above suggestions helps.

    Regards,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. derrick
    derrick avatar
    21 posts
    Member since:
    Sep 2009

    Posted 17 Dec 2009 Link to this post

    Hi,

    I didn't see the TileView mentioned in the latest build Release Notes--do you know if this problem has been fixed yet?  (RadTileView tiles not laying out correctly until clicked or resized).

    Thanks,

    Derrick

  9. Congero
    Congero avatar
    20 posts
    Member since:
    Sep 2012

    Posted 17 Dec 2009 Link to this post

    I am having the same problem with the irregular layout and I am also anxiously awaiting the fix.  Please advise.  Thanks for you support.
  10. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 18 Dec 2009 Link to this post

    Hello guys,

    We could not address the bug in the latest release, but we will do our best to provide a patch as soon as possible.

    Sincerely yours,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  11. derrick
    derrick avatar
    21 posts
    Member since:
    Sep 2009

    Posted 23 Dec 2009 Link to this post

    Please, Please, Please address this bug soon.  It's been a month and we are getting to close to having to deliver our solution to our customer.  If you can't fix it, at least give me a workaround so I can force it to re-layout somehow.  Thanks.
  12. Congero
    Congero avatar
    20 posts
    Member since:
    Sep 2012

    Posted 23 Dec 2009 Link to this post

    I totally agree with Derrick.  We used this control in our prototype to the client as a major selling point with the assurance that a bug fix was forthcoming.  We are working against a tight deadline.  If there is no fix please give us a workaround!!
  13. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 24 Dec 2009 Link to this post

    Hello Reggie Tyler,

    The fix is coming in the mid-January with the SP release. If you need it even earlier - please let us know.

    Best wishes,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  14. Congero
    Congero avatar
    20 posts
    Member since:
    Sep 2012

    Posted 24 Dec 2009 Link to this post

    Hi Valentin
    Thanks for your response.  First I would like to say that I've a big fan of Telerik, the products they produce and the support behind the products. Thanks to you and all of the people on the Telerik team.  The short answer is yes,we need it asap.  The excitement the control generated when we previewed it to our client will rapidly disappear if we are not able to deliver it in the final product.  I'm sure you understand how this impacts our ability to manage the customer's expectations.  Thanks for any help you can provide and have a great holiday season.
     
    Regards
    Reggie
  15. derrick
    derrick avatar
    21 posts
    Member since:
    Sep 2009

    Posted 24 Dec 2009 Link to this post

    Hi,

    Yes, I would like a workaround in advance of the SP release if possible.  The tiles layout correctly after clicking one of them, maybe we could simulate a mouse click or something?  Maybe add a method to force a layout, anything.

    Thanks and Merry Christmas!

    Derrick

  16. derrick
    derrick avatar
    21 posts
    Member since:
    Sep 2009

    Posted 27 Dec 2009 Link to this post

    I figured out a workaround for now.  Since the control works the first time, just recreate the control each time you want to load a different set of tiles:

          RadTileView OldPods = this.Pods;
          this.Pods = new RadTileView();
          ((Border)OldPods.Parent).Child = this.Pods;
          this.Pods.Name = OldPods.Name;
          this.Pods.Margin = OldPods.Margin;
          this.Pods.MinimizedColumnWidth = OldPods.MinimizedColumnWidth;
          this.Pods.MinimizedItemsPosition = OldPods.MinimizedItemsPosition;

         ...load tiles...

     

  17. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 28 Dec 2009 Link to this post

    Hi derrick,

    ok - we will let you know once this is fixed.

    Best wishes,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  18. Dheeraj Ramaswamy
    Dheeraj Ramaswamy avatar
    15 posts
    Member since:
    Jun 2008

    Posted 29 Dec 2009 Link to this post

    There is one way to fix the layout issue which is to set the first tileviewitem to maximized state and the rest to minimized. This does fix the issue however the issue with the largecontent being displayed is even on minimized mode does still exist.
  19. Cass
    Cass avatar
    13 posts
    Member since:
    Jan 2010

    Posted 08 Jan 2010 Link to this post

    I have the same problem-- eagerly anticipating the fix.

    Or is there any code I could use to deliver an automatic Click to the header? That would seem to solve the problem too.

    Thanks!
  20. Cass
    Cass avatar
    13 posts
    Member since:
    Jan 2010

    Posted 13 Jan 2010 Link to this post

    Hi Telerik,

    Thanks for your awesome controls. Could you please let me know when the bug is fixed for TileView (or if it is possible to do a workaround by programming in a manual header click)? My firm has a software demo on January 16th and is really counting on the fix. It would be a major turnoff to clients if the tiles loaded like it is doing now.

    Cassandra
  21. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 13 Jan 2010 Link to this post

    Hello Cass,

    Yes - this fix is now part from the Q3.SP2 release which should be available for download by the end of the week.

    Greetings,
    Valentin.Stoychev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  22. Cass
    Cass avatar
    13 posts
    Member since:
    Jan 2010

    Posted 13 Jan 2010 Link to this post

    Wonderful! Thank you so much.
  23. Ramin Aminloo
    Ramin Aminloo avatar
    35 posts
    Member since:
    Dec 2009

    Posted 27 Jan 2010 Link to this post

    How can I get the latest fix? When I load the Tileview using Code-Behind. Notice that 1st RadTileViewItem is maximized and it is behind the other minimized items. I then tried to force all items to be minimized but still the same problem.

                foreach (PHI item in rows)
                {
                    RadTileViewItem rtvItem = new RadTileViewItem();
                    rtvItem.Header = item.Description;
                    rtvItem.TileState = TileViewItemState.Minimized;
                    rtvItem.Content = rtvItem;
                    rtvItems.Add(rtvItem);

                }
  24. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 28 Jan 2010 Link to this post

    Hi Martin,

    I was not able to reproduce the problems you report using the latest version of the controls (2009 Q3 SP2). Can you please download the latest version from your client account and see if the problem persists?

    All the best,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  25. Ramin Aminloo
    Ramin Aminloo avatar
    35 posts
    Member since:
    Dec 2009

    Posted 28 Jan 2010 Link to this post

    I do have the latest version and still the same problem. 1st image is when loads first. After resizing the content by clicking the title, it sorts itself right. But now LargeContent and SmallContant  does not load correctly at all time. This control is very buggy.




  26. Dheeraj Ramaswamy
    Dheeraj Ramaswamy avatar
    15 posts
    Member since:
    Jun 2008

    Posted 28 Jan 2010 Link to this post

    Hi Martin,

     I had the same issue but it was related to the sizing you provide for large/small content for fluid control. The best thing to do is to handle this maually by setting ContentChangeMode of fluid control to manual and handling TileStateChanged on the TileView.
  27. Ramin Aminloo
    Ramin Aminloo avatar
    35 posts
    Member since:
    Dec 2009

    Posted 28 Jan 2010 Link to this post

    Thanks, that did fix the Large/Small Content issue. However I still have display issue during the first load. If I slightly re-size the browser height it will fix itself. See the attachments, 1 is the initial load and 2 is after slight resizing the browser.

    Thanks
  28. Dheeraj Ramaswamy
    Dheeraj Ramaswamy avatar
    15 posts
    Member since:
    Jun 2008

    Posted 28 Jan 2010 Link to this post

    While building your TileView from code, try setting {TileControl}.MaximizeMode = TileViewMaximizeMode.ZeroOrOne and set only one of the tileviewitem to Maximized along with fluidcontrolstate to large ...set the rest of the timeviewitem to minimized.

  29. Ramin Aminloo
    Ramin Aminloo avatar
    35 posts
    Member since:
    Dec 2009

    Posted 28 Jan 2010 Link to this post

    Thanks, that worked. So I can't have them all small state. One has to be at large state at all time? Will this be fixed?

    2nd question, still cosmetically there is an issue. Look at the 1st image and then 2nd. The tiles are bleeding on each other. As soon as I do the resizing, it will fix it.  
  30. Dheeraj Ramaswamy
    Dheeraj Ramaswamy avatar
    15 posts
    Member since:
    Jun 2008

    Posted 28 Jan 2010 Link to this post

    From what I know off, you can have all of them to Restored State but not all can be minimized....

    Regarding the second question ..You may want to make sure your project is referencing the latest dll. I dont have such issues on my project.
  31. Ramin Aminloo
    Ramin Aminloo avatar
    35 posts
    Member since:
    Dec 2009

    Posted 28 Jan 2010 Link to this post

    Thanks Dheera,

    That did it. You been a great help. Thanks

    Regards
Back to Top
DevCraft banner