Question : Obtaining the DataGridTemplateColumn to set items source in code behind

I have created a data template for my grid that has a cell editing template as a combo box where the item source I want to set at runtime. I'm having a problem though determining how to navigate to the inner entity of the grid so I can set its item source. Any ideas?

Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:


    
	
    


    
	
 
	
    


Answer : Obtaining the DataGridTemplateColumn to set items source in code behind

Maybe you can set the Itemsource for your combobox in the xaml itself.  Since it is a two way , you can set the collection dynamically at run time in the code which will be displayed to the user.

Else, You have to go to the particular Cell, get the datatemplate and cast it to a combox. Then use SetBinding method to set "itemsource".
Random Solutions  
 
programming4us programming4us