How do i get in which column the particular "TileViewItem" is?

2 posts, 1 answers
  1. James
    James avatar
    26 posts
    Member since:
    Oct 2008

    Posted 05 Nov 2009 Link to this post

    Hi There,

    Thank you for the Q3 release.

    I was waiting for the official release of the "TileView" control, and with this Q3 release I have started using it in our application.

    I was wondering, how do i get the column number of the "TileViewItem"?

    I add the "TileViewItem" dynamically into the "TileView" control, and TileViewControl adds the "TileViewItem" into the next column in the queue.
    Now, I need to know which "TileViewItem" is in which column.

    Is there any way i can achieve with the current available version?

    Thanks,
    Bhavin
  2. Answer
    Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 06 Nov 2009 Link to this post

    Hi James,

    You can get the current column of the item in the following way:

    // In case you added RadtileViewItem objects in the TileView
    Grid.GetColumn(tileViewName.Items[0] as RadTileViewItem);

    // Alternatively, in case you populated the TileView from a data source
    Grid.GetColumn(tileViewName.ItemContainerGenerator.ContainerFromItem(dataItem) as RadTileViewItem);


    Of course, the above code makes sense only when all items are in Restored state - otherwise there is a Maximized item and the rest are in the same column or row depending on where the minimized items are docked.

    I hope I was able to help. Let me know if you have any other questions.

    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.
  3. DevCraft banner
Back to Top