This is a migrated thread and some comments may be shown as answers.

Problem with RIA+ComboBoxColumn+2DomainDataSource

2 Answers 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Iosu Buenetxea
Top achievements
Rank 1
Iosu Buenetxea asked on 08 Apr 2010, 09:25 AM
Hi there,

I have two tables with data (NACION and DIVISA), 2 Domain Data Sources and I'm using VS2010 RC + RIA + Silverlight Q1 2010

This is my code:
    
<riaControls:DomainDataSource AutoLoad="True"   
        d:DesignData="{d:DesignInstance my:NACION, CreateList=true}"   
        Name="NACIONDomainDataSource"   
        QueryName="GetNACIONsQuery">  
        <riaControls:DomainDataSource.DomainContext> 
            <my:NationContext />    
        </riaControls:DomainDataSource.DomainContext> 
    </riaControls:DomainDataSource> 
    <riaControls:DomainDataSource AutoLoad="True"   
        d:DesignData="{d:DesignInstance my:DIVISA, CreateList=true}"   
        Name="DIVISADomainDataSource"   
        QueryName="GetDIVISAsQuery">    
        <riaControls:DomainDataSource.DomainContext> 
            <my:CurrencyContext /> 
        </riaControls:DomainDataSource.DomainContext> 
    </riaControls:DomainDataSource> 
    <telerikGridView:RadGridView    
        ItemsSource="{Binding ElementName=NACIONDomainDataSource, Path=Data}"   
        Name="MAINRadGridView"   
        AutoGenerateColumns="False">  
        <telerikGridView:RadGridView.Columns> 
            <telerikGridView:GridViewDataColumn Header="NATION CODE" 
                DataMemberBinding="{Binding CODPAIS, Mode=TwoWay}"/>   
            <telerikGridView:GridViewDataColumn Header="DESCRIPTION" 
                
DataMemberBinding="{Binding DENOMI, Mode=TwoWay}"/>  
            <telerikGridView:GridViewComboBoxColumn Header="CURRENCY CODE" 
                
DataMemberBinding="{Binding CODDIV, Mode=TwoWay}" 
                
UniqueName="Currency" SelectedValueMemberPath="Id" 
                
ItemsSource="{Binding ElementName=DIVISADomainDataSource, Path=Data}" 
                
DisplayMemberPath="Name" /> 
        </telerikGridView:RadGridView.Columns> 
    </telerikGridView:RadGridView> 

In this GridView the ComboBoxes are always empty.

What's wrong?
Thanks!

2 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 14 Apr 2010, 10:02 AM
Hello JUAN CRESPO,

Please replace the
ItemsSource="{Binding ElementName=DIVISADomainDataSource, Path=Data}"
with
ItemsSourceBinding ="{Binding ElementName=DIVISADomainDataSource, Path=Data}"

Please have in mind that GridViewComboBoxColumn column has a known issue with DomainDataSource . Due to the asynchronous nature of loading data , in certain scenarios it will remain empty since the items source data for the combo comes too  late.

We are currently fixing this. Meanwhile you may use one of the following workarounds.

1. You may load explicitly the ItemsSource data in the DomainDataSource ( by calling the relevant load  method of the DIVISADomainDataSource ) at earlier stage.

2. Instead of using GridViewCombobox column , you may use a regular column and place a Combobox in the cell via the CellTemplate property

Let me know in case you need furhter assistance.

Sincerely yours,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Iosu Buenetxea
Top achievements
Rank 1
answered on 15 Apr 2010, 10:09 AM
I'm going to try it.

Thanks!
Tags
GridView
Asked by
Iosu Buenetxea
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Iosu Buenetxea
Top achievements
Rank 1
Share this question
or