Salut,


Je souhaite alimenter un dataGridView silverlight dont voici le code:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
<UserControl x:Class="gridData.Page" xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="460" Height="300">
    <Grid x:Name="totalDataGridView" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
 
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
        </Grid>
        <my:DataGrid x:Name="myDataGridView" AutoGenerateColumns="True" Grid.Row="0" Margin="10,0,10,10">
            <my:DataGrid.RowDetailsTemplate>
                <DataTemplate>
                    <Grid>
                        <TextBlock Width="400" Height="50" />
                    </Grid>
                </DataTemplate>
            </my:DataGrid.RowDetailsTemplate>
        </my:DataGrid>
    </Grid>
</UserControl>
J'utilise WCF pour lié silverlight à ma base de donnée, ceci dit, je ne vois pas, dans le onload de la page de silverlight comment lié et afficher les données d une table dans la grille.


Comment faire?

Meilleures salutations