This is a migrated thread and some comments may be shown as answers.

RadListPicker inline mode not working via Databinding

4 Answers 122 Views
ListPicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Aidan
Top achievements
Rank 1
Aidan asked on 02 Dec 2010, 09:23 PM
Hi,

I am new to using Telerik controls so I may be overlooking something here or got my diagnosis wrong.
First I thought Databinding on Objects via DisplayMemberPath wasn't working but anyway.

If I databind to a List<T> that has less elements than the inline mode threshold, the RadListPicker will only highlight the selected item, it does not expand within the visual tree.

Using version 2010.3.1124.1037

Anyone confirm this?

Regards

Aidan



4 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 06 Dec 2010, 11:16 AM
Hello Aidan,

Thank you for contacting us and for your interest in RadControls for Windows Phone 7.

The controls behaves correctly on my side and binds properly to a list of items which count is less than the InlineModeThreshold property. I am using the following code:

- A sample business object

public class Item
{
    public string Text
    {
        get;
        set;
    }
}

- Then in the constructor I put the following code:

List<Item> items = new List<Item>();
for (int i = 0; i < 3; i++)
{
    Item item = new Item();
    item.Text = "Item " + i;
    items.Add(item);
}
 
this.DataContext = items;

- And here is how the XAML looks like:

<Telerik:RadListPicker Grid.Row="0" ItemsSource="{Binding}" DisplayMemberPath="Text">

I hope this information is helpful. If you continue to experience issues with the control you may open a support ticket with a sample project attached that demonstrates the problem so that we may further help you.

Kind regards,
Georgi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Aidan
Top achievements
Rank 1
answered on 06 Dec 2010, 09:11 PM
Hi

The issue was layout.

When I added the control to the page it displayed itself as expanding the entire content pane. That threw me, so I sized it.
Which I now realise means that the control has a fixed size, hence no expanding.
When I removed the Margin and ignored what the designer was showing and ran the emulator, I got expanding behaviour.
Too much this time, as it moved over other items.
Reading the example code more closely reveals the use of grid.row to get the correct behaviour of the row expanding and the above and below contents moving appropriately.

I don't know if the designer displaying the control as covering it's parent is the expected behaviour when initially added, if not I can raise it as an issue.

Aidan
 
0
Georgi
Telerik team
answered on 07 Dec 2010, 09:10 AM
Hi Aidan,

If you do not specify the desired numbers of rows in the grid and which row each control occupies, the Grid Panel will treat all controls as if they reside within one and the same row. Hence controls will not be automatically laid-out one beneath another and will have a fixed position, determined by their Margin property.

You may examine our Examples Framework solution (shipped as part of the release package) where you can find the source code of all the examples.

All the best,
Georgi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Aidan
Top achievements
Rank 1
answered on 07 Dec 2010, 06:44 PM
Yes, agreed, once I focused on the supplied examples and introduced a grid, things started to render correctly.




Tags
ListPicker
Asked by
Aidan
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Aidan
Top achievements
Rank 1
Share this question
or