Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dears,


How to Create combo box in datagrid dynamically in silver light 3 not in xaml page

Regards,

Vishwanatha
Posted

Hope this[^] might help you.
 
Share this answer
 
Comments
Abhinav S 9-Jun-11 3:25am    
He is looking to create a combobox using code behind. So this link will not be useful to the OP.
VB
Dim templateCol As New DataGridTemplateColumn()
templateCol.CellTemplate = XamlReader.Load("<DataTemplate xmlns='http://schemas.microsoft.com/client/2007'" & vbCr & vbLf & vbCr & vbLf & "xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'><ComboBox x:Name='comb' /> </DataTemplate>")
 Datagrid.Columns.Add(templateCol)
 
Share this answer
 
Have a look at this link[^]. It does not describe adding a combobox, but it describes adding a DataTemplateColumn dynamically. Adding a combobox to the template column is not very difficult.
 
Share this answer
 
Comments
vishwanatha Ananda 9-Jun-11 8:56am    
give me suggestion how to add combobox inside DatatemplateColumn dynamically
vishwanatha Ananda 9-Jun-11 8:57am    
without using xmlreader

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900