Problem with RIA+ComboBoxColumn+2DomainDataSource

3 posts, 0 answers
  1. Iosu Buenetxea
    Iosu Buenetxea avatar
    91 posts
    Member since:
    Jan 2008

    Posted 08 Apr 2010 Link to this post

    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}"   
                <my:NationContext />    
        <riaControls:DomainDataSource AutoLoad="True"   
            d:DesignData="{d:DesignInstance my:DIVISA, CreateList=true}"   
                <my:CurrencyContext /> 
            ItemsSource="{Binding ElementName=NACIONDomainDataSource, Path=Data}"   
                <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" /> 

    In this GridView the ComboBoxes are always empty.

    What's wrong?
  2. Pavel Pavlov
    Pavel Pavlov avatar
    2039 posts

    Posted 14 Apr 2010 Link to this post

    Hello JUAN CRESPO,

    Please replace the
    ItemsSource="{Binding ElementName=DIVISADomainDataSource, Path=Data}"
    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.
  3. Iosu Buenetxea
    Iosu Buenetxea avatar
    91 posts
    Member since:
    Jan 2008

    Posted 15 Apr 2010 Link to this post

    I'm going to try it.

Back to Top