Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a datagrid , inside datagrid I have to bind some listbox (es) based on ID of the particular record.

For eg.

HTML
TextColumn 	TextColumn  TextColumn 	 TemplateColumn 
ID 	           NAME 	      CLASS       SUBJECT
1	           XXX	         A         JAVA
 	 	 	                   .NET
2	           YYY	         B	 .NET
 	 	 	                    C++
3	           ZZZ	         C	 JAVA
 	 	 	                    C++

SUBJECT column should be loaded in a Listbox inside the datagrid. I have successfully loaded DataGridTextColumn‘s (ID,NAME ,CLASS)
But I couldnt able to load the SUBJECT.

NOTE : I have binded the DataGridTextColumn’s in the datagrid by returning a list from WCF service.

Please do the needful.
Posted

 
Share this answer
 
Comments
meetprabhum 26-Jul-12 9:03am    
i already tried the links provided, but its not worked for me.
Well, you need to fill the Listbox inside DataGridTemplateColumn. In the itemsource of your Listbox you can add something like this:
XML
Itemsource={Binding {StaticSource domainservice}, Path=Data}

Now, in your DataGridTemplateColumn you can find a DataBinding property (I just cannot remember the real property):
XML
DataBinding={Binding SUBJECT, Mode=TwoWay}


Hope it helps.
 
Share this answer
 

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