Hello,
I am using your tileView in my app.
I am using a tile that every item in it is itself a tileView of user controls.
I am having an exception when I switch the itemsource of the outer tile (which effects the inner ones as well as they are binded to it).
The big tile's itemsource is binded to a treeview's itemsource.
Whenever there is a change in the treeview's collection (the tree has checkboxes the decide which tiles will be visible) I am updating the binding manually (getting the binding expression and updating).
In a converter I convert the collection (a ListCollectionView of the viewmodel class of the user controls, filtered into groups) that I got from the tree to a collection that contains only the groups that are checked in the checkboxes (the groups are the outer tileItems).
In the converter I copy the collection and delete only the groups that are unchecked (not supposed to be visible).
The user controls within each group are binded to a boolean property that tells the visibility of the items (with a converter).
The problem is that sometimes when I update the binding, I get notification of a tilePositionChanged of the inner tileView (that contains the user controls).
The position that I get is -1, and that value does not come from my viewmodel (I checked).
Than I get an exception thrown because the tileView tries to put an item's column property to -1.
This does not happen every time, only when checking or unchecking an item and than I refresh the binding of the bigger TileView(which the inner ones are binded to).
I hope you have enough data.
unfortunately i can't attach the code.
Thank you in advanced,
Tamir.
8 Answers, 1 is accepted

I have the same problem:
System.ArgumentException: '-1' is not a valid value for property 'Column'.
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.Controls.Grid.SetColumn(UIElement element, Int32 value)
at Telerik.Windows.Controls.TileViewPanel.GetRestoredRect(RadTileViewItem child)
at Telerik.Windows.Controls.TileViewPanel.ArrangeRestoredChildren()
at Telerik.Windows.Controls.TileViewPanel.ArrangeOverride(Size finalSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
Unfortunately I wasn't able to reproduce this issue so I'd like to ask you some more information - what is your dlls' version, are your tileView items grouped, is the problem related to the tileStates of your items, do you change the visibility runtime, how exactly do you reproduce it and etc. Some code snippets would also help - a sample project would be best.
I've attached the sample project that I used for testing so could you please take a look at it and tell us what you're doing differently?
We're looking forward to hearing from you.
Greetings,
Zarko
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

This error appears when Position property is used with TileViewItems that may be collapsed (but not in all cases). The following piece of code will throw the error as mentioned above: ('Visibility' in actual code is not hardcoded but bound to a property, hence determined at runtime). I'm using 2013 Q2 dlls.
<
telerik:RadTileView
x:Name
=
"RadTileView1"
>
<
telerik:RadTileViewItem
Header
=
"Item1"
Position
=
"1"
>
<
TextBlock
Text
=
"Item1 Content"
/>
</
telerik:RadTileViewItem
>
<
telerik:RadTileViewItem
Header
=
"Item2"
Position
=
"2"
>
<
TextBlock
Text
=
"Item2 Content"
/>
</
telerik:RadTileViewItem
>
<
telerik:RadTileViewItem
Header
=
"Item3"
Visibility
=
"Collapsed"
Position
=
"3"
>
<
TextBlock
Text
=
"Item3 Content"
/>
</
telerik:RadTileViewItem
>
<
telerik:RadTileViewItem
Header
=
"Item4"
Position
=
"4"
>
<
TextBlock
Text
=
"Item4 Content"
/>
</
telerik:RadTileViewItem
>
<
telerik:RadTileViewItem
Header
=
"Item5"
Visibility
=
"Collapsed"
Position
=
"5"
>
<
TextBlock
Text
=
"Item5 Content"
/>
</
telerik:RadTileViewItem
>
<
telerik:RadTileViewItem
Header
=
"Item6"
Position
=
"6"
>
<
TextBlock
Text
=
"Item6 Content"
/>
</
telerik:RadTileViewItem
>
</
telerik:RadTileView
>
Important: Now, if I set the Visibility of first TileViewItem as Collapsed, this code will work. Alternatively, If I remove the last 3 TileViewItems, the code works too. Hopefully it helps you fix the issue.
I got around by removing the Position property from the code for now, but will be good to have this bug/undocumented feature resolved as it took me a day to figure out the source of the problem.
Thanks
Thank you for the feedback and the code snippets. The issue in your case is that the positions of your items start from 1 when they should start from 0 (the position property is zero-based). You should be careful when you use both - position and visibility on initial loading because when you collapse an item it internally changes the positions of the items after it, so that there are no empty spaces and this could lead to problems (like in your case).
I hope I was able to help you and if you have further questions please feel free to ask.
Regards,
Zarko
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>

I am facing issue with RadTileView. the error is shown below.
{"'-1' is not a valid value for property 'Column'."}
the code is working fine if i choose listbox instead of tileview. I am trying to dynamically load content based on tile state.
Could you please help in this?
Regards,
Sanjay
Could you please elaborate a little bit more on your scenario so that we could test it on our side and give you a better fix/workaround ? Also a sample application or some code snippets will be greatly appreciated.
We're looking forward to hearing from you again.
Regards,
Zarko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

ContentTemplate="{StaticResource contentTemplate}" IsSelectionEnabled="True"
IsItemDraggingEnabled="{Binding ElementName=IsItemDraggingEnabledOption,
Path=IsChecked}"
ItemTemplate="{StaticResource headerTemplate}"
MaximizeMode="{Binding ElementName=MaximizeModeOption,
Path=SelectedItem}"
PreservePositionWhenMaximized="{Binding ElementName=PreservePositionWhenMaximizedOption,
Path=IsChecked}"
TileStateChangeTrigger="{Binding ElementName=StateChangeOption,
Path=SelectedItem}"
SelectedItem="{Binding SelectedTile}">
</telerik:RadTileView>
Please have a look at the code. I have templates bind when the state changes from normal to maximized using radfluidcontrol.
Thank you for the code snippet but unfortunately we're still not able to reproduce the issue so I'd like to ask you to open a support thread and send us a sample project demonstrating the exception there.
Zarko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.