Click here to Skip to main content
11,645,087 members (64,989 online)
Rate this: bad
good
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 3:00am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
meetprabhum at 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
0 OriginalGriff 700
1 jyo.net 494
2 Sergey Alexandrovich Kryukov 449
3 Afzaal Ahmad Zeeshan 444
4 CPallini 426
0 OriginalGriff 1,065
1 Sergey Alexandrovich Kryukov 703
2 Afzaal Ahmad Zeeshan 702
3 DamithSL 681
4 CPallini 595


Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 1 Aug 2012
Copyright © CodeProject, 1999-2015
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