Welcome to the Xceed Community | Help
Community Search  
More Search Options

Unexpected difference with ForeignKeyConfiguration between XAML and code

Sort Posts: Previous Next
  •  07-02-2009, 7:52 AM Post no. 22209

    Unexpected difference with ForeignKeyConfiguration between XAML and code

    Hi

    When I use a column definition with ForeignKeyConfiguration in XAML, everything works just fine.

          <DataGrid:Column FieldName="ShipVia" Title="Ship Via"

                    CellContentTemplate="{StaticResource ValueDataTemplate}"

                    ForeignKeyConfiguration="{StaticResource shipViaForeignKeyConfiguration}"

          /> 

    But when I set ForiegnKeyConfiguration property from code-behind, the grid loses the Combobox selection of values.

    for example:

    ForeignKeyConfiguration configuration = (ForeignKeyConfiguration)FindResource("shipViaForeignKeyConfiguration");

    Column column = _grid.Columns.First(c => c.FieldName =="ShipVia") as Column;

    column.ForeignKeyConfiguration = configuration;

     
    Note: I require this because I generate those columns dynamicly.

    Am I doing something wrong? possibly a bug?

     

    Ariel 


     

     

     

  •  07-09-2009, 1:29 PM Post no. 22433 in reply to 22209

    Re: Unexpected difference with ForeignKeyConfiguration between XAML and code

    There should be no differences between code and xaml unless you are attempting to provide dynamic values. In which case, it will not be possible in XAML, as detailed in this thread: http://xceed.com/CS/forums/thread/22230.aspx
     
    Just to make sure you are using the latest version, please send me an email at belandj@xceed.com and I will send you the service release that is scheduled for public release on Monday.  


    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.