开发者

silverlight custom control combo box binding

开发者 https://www.devze.com 2023-03-25 12:19 出处:网络
here two comboboxes in a user control: <ComboBox Name=\"comboAmagat\" ItemsSource=\"{Binding Path=Screen.TotsElsElementsDeCosts, Mode=TwoWay}\"

here two comboboxes in a user control:

     <ComboBox Name="comboAmagat"
                  ItemsSource="{Binding Path=Screen.TotsElsElementsDeCosts, Mode=TwoWay}"
                  SelectedItem="{Binding Path=Value, Mode=TwoWay}"                  
                  ></ComboBox>

        <ComboBox Name="comboAmagat2"
                  ItemsSource="{Binding Path=Screen.TotsElsElementsDeCosts, Mode=TwoWay}"
                  SelectedItem="{Binding Path=Screen.TCon开发者_如何学JAVAversio_Aplicacions_ElementsDeCosts.SelectedItem.dimElementDeCost, Mode=TwoWay}" >
</ComboBox>   

When screen is showed combo don't has a the selected item value. Selected Item is missing until:

  • For comboAmagat2: user change row
  • For comboAmagat: user change to a row with a different "dimElementDeCost" that first row.

What is wrong?

0

精彩评论

暂无评论...
验证码 换一张
取 消