Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Dynamic creation & binding of Silverlight datagrid
2 replies. Latest Post by oneone on October 2, 2008.
(0)
oneone
Member
15 points
31 Posts
10-01-2008 2:16 AM |
Hi, everyone :
i read this blog :http://blogs.msdn.com/deepak_verma/archive/2008/07/19/dynamic-creation-binding-of-silverlight-datagrid.aspx
it's work fine !
but, how to add other kind the component, like listbox.
And another question, i have ask already, but i still don't get it.
when i use datagrid like this, i don't know how to bind my data to listbox
and i can find the myDataGrid, but i can't find myListBox, can someone explain why and how, thanks.
<my:DataGrid x:Name="myDataGrid" Width="500" Height="500" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="Visible" > <my:DataGrid.Columns> <my:DataGridTextColumn Header="Name" DisplayMemberBinding="{Binding Name}" /> <my:DataGridTextColumn Header="Ages" DisplayMemberBinding="{Binding Ages}" /> <my:DataGridTemplateColumn > <my:DataGridTemplateColumn.CellTemplate> <DataTemplate> <ListBox x:Name="myListBox" FontFamily="Arial" Margin="8" ItemsSource="{How to Binding ?}" /> </DataTemplate> </my:DataGridTemplateColumn.CellTemplate> </my:DataGridTemplateColumn> </my:DataGrid.Columns></my:DataGrid>
my English not good, hope you know what i am say, thanks for your help
Best regard !
preishuber
Contributor
3570 points
655 Posts
10-01-2008 4:50 AM |
that blog entry should answere your question
http://weblogs.asp.net/manishdalal/archive/2008/09/28/combobox-in-datagrid.aspx
10-02-2008 4:18 AM |
This is great !!
Thanks