tags:

views:

41

answers:

1

I have a silverlight datagrid like this

<data:DataGrid x:Name="productsDataGrid">
            <data:DataGrid.Columns>
                <data:DataGridTextColumn Header="Desc" Binding="{Binding SmallDesc}"/>
                <data:DataGridTemplateColumn>
                    <data:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Image Width="50" Height="50" Source="{Binding SmallPhotoLoc}"></Image>
                        </DataTemplate>
                    </data:DataGridTemplateColumn.CellTemplate>
                </data:DataGridTemplateColumn>
            </data:DataGrid.Columns>
</data:DataGrid>  

That will get me this pattern of data like this:
Text Image
Text Image
Text Image
Text Image

Can anyone please advice on how to get the following pattern:
Text  Image
Image  Text
Text  Image
Image  Text

+1  A: 

Use a listbox with a DataTemplateSelector

here is an example

http://geekswithblogs.net/tkokke/archive/2009/09/28/datatemplateselector-in-silverlight.aspx

JoshVarga