S
srimaniarjunan
Guest
I have a combobox in silverlight application..
<ComboBox FontWeight="Normal"
Grid.Row="1"
Grid.Column="4"
x:Name="ddlService"
DropDownClosed="ddlService_DropDownClosed"
SelectedItem="{Binding Path=ServiceName,NotifyOnValidationError=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Style="{StaticResource Comboboxstyle}">
Im binding the selected value or selected Item to this combo box from the database..
But the value is not get binded as the selected value or item to this combo..Instead of showing the selected value,it is showing the values once again..
code is as follows
if (ddlService.Items.Count>0)
{
if (ddlService.ItemsSource!=null)
{
ddlService.SelectedValue = ServiceName;//this name is retrieved from the database..
ddlService.SelectedItem = ServiceName;//this name is retrieved from the database..
}
}
the property of combo,UpdateSourceTrigger ,I have changed to default,explicit and propertychanged..
Then also I was not getting the binded value as selected value.
Any one help me out to resolve this.
thank you.
Continue reading...
<ComboBox FontWeight="Normal"
Grid.Row="1"
Grid.Column="4"
x:Name="ddlService"
DropDownClosed="ddlService_DropDownClosed"
SelectedItem="{Binding Path=ServiceName,NotifyOnValidationError=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Style="{StaticResource Comboboxstyle}">
Im binding the selected value or selected Item to this combo box from the database..
But the value is not get binded as the selected value or item to this combo..Instead of showing the selected value,it is showing the values once again..
code is as follows
if (ddlService.Items.Count>0)
{
if (ddlService.ItemsSource!=null)
{
ddlService.SelectedValue = ServiceName;//this name is retrieved from the database..
ddlService.SelectedItem = ServiceName;//this name is retrieved from the database..
}
}
the property of combo,UpdateSourceTrigger ,I have changed to default,explicit and propertychanged..
Then also I was not getting the binded value as selected value.
Any one help me out to resolve this.
thank you.
Continue reading...