HowTo accessing DataGridTemplateColumn

Aug 23, 2009 at 2:03 PM

How can i access(adding some items) the ListBox in the DataGrid at DataGrids LoadingRow-Event?

 <my:DataGrid LoadingRow="dgTNT_LoadingRow"  Name="dgTNT" IsSynchronizedWithCurrentItem="True" >
            <my:DataGrid.Columns>
                <my:DataGridTextColumn Header="Name" Binding="{Binding  Path=TNT_NAME}"/>
                <my:DataGridTextColumn Header="Vorname" Binding="{Binding  Path=TNT_VNAME}"/>
                <my:DataGridTextColumn Header="Ort" Binding="{Binding  Path=TNT_ORT}"/>
                <my:DataGridTemplateColumn Header="E-Name">
                    <my:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >                        

                               <ListBox MaxHeight="50" Name="myListBox" DisplayMemberPath="PS_NAME" >
                               
                            </ListBox>
                        </DataTemplate>
                    </my:DataGridTemplateColumn.CellTemplate>
                    </my:DataGridTemplateColumn >

            </my:DataGrid.Columns>
        </my:DataGrid>