Click here to Skip to main content
15,946,342 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

In my silverlight application, I have a combobox in my datagrid that binds to a class.
When I change the combobox, I can get the Index to the class, But the combobox doesn't change when I update the class programmatically
Please Help me to sort this out. urgent.

<data:datagridtemplatecolumn header="Sale Unit" width="80" xmlns:data="#unknown">
            <combobox itemspanel="{Binding RelativeSource={RelativeSource Self}}" datacontext="{Binding}" selectedindex="{Binding Path=cursunit,Mode=TwoWay}" keydown="ComboBox_KeyDown" loaded="ComboBox_Loaded" selectionchanged="ComboBox_SelectionChanged">
                <comboboxitem content="BOX" />
                <comboboxitem content="STRIP" />
                <comboboxitem content="PEICE" />
Updated 3-Jan-12 23:36pm

As per your code i think you should see the combobox in DataGrid Edit mode only
so check while changing the value of binding object, that datagrid is in Edit mode ,then only it will work.codewise it is ok.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900