I have a combo in grid
Main table that populates grid has the id and other table has the details/description of that ID
I have tried to follow the sample
http://labs.infragistics.com/silverlight/lobsamples/2010.3/#/Samples/ComboEditor/DataBinding/ComboInGrid
But that does not work with db
Any links
Hi,
your TemplateColumn's ItemTemplate should look something like this:
<ig:TemplateColumn.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Path=YID, Converter={StaticResource yourConverter}, ConverterParameter={StaticResource ViewYData}}" /> </DataTemplate></ig:TemplateColumn.ItemTemplate>and the value converter should like something like: public class LookupValueConverter : IValueConverter{ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { var viewY = parameter as Dictionary<int, string>; return viewY[(int)value]; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); //You don't need to ConvertBack since TextBlock is not an editor control }}HTH
Can you show how the Textblock would look like?
there are two way you could achieve this scenario:
HTH,
ViewX
ViewY
ID
CityName
CityState
YID
1
xxx
TX
2
yyy
NY
3
zzz
MA
YDesc
Sunny
Warm
Cold
Grid should show
The one that I have highlighted in Yellow should be shown in textbox and when edit is clicked Combo should be populated with the data in ViewY with default selected
I am able to get the data in combo correctly with no default selected and not able to show textbox to show the ones in yellow in grid
could you provide more details or a sample application illustrating the issues you are experiencing.
Regards,