Click here to Skip to main content
12,763,226 members (34,228 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
2	           YYY	         B	 .NET
3	           ZZZ	         C	 JAVA

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
Please Sign up or sign in to vote.

Solution 1

meetprabhum 26-Jul-12 9:03am
i already tried the links provided, but its not worked for me.
Rate this: bad
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.

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
Web01 | 2.8.170217.1 | Last Updated 1 Aug 2012
Copyright © CodeProject, 1999-2017
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