Click here to Skip to main content
12,241,599 members (38,208 online)
Rate this:
 
Please Sign up or sign in to vote.
I have a datagrid , inside datagrid I have to bind some listbox (es) based on ID of the particular record.

For eg.

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 25-Jul-12 4:00am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
meetprabhum 26-Jul-12 9:03am
   
i already tried the links provided, but its not worked for me.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Well, you need to fill the Listbox inside DataGridTemplateColumn. In the itemsource of your Listbox you can add something like this:
Itemsource={Binding {StaticSource domainservice}, Path=Data}
Now, in your DataGridTemplateColumn you can find a DataBinding property (I just cannot remember the real property):
DataBinding={Binding SUBJECT, Mode=TwoWay}

Hope it helps.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 1 Aug 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100