When I'm editing a DataGrid row, using a custom EditTemplate with a SelectList, with it's SelectedValue binded to CellEditContext.CellValue, the SelectedValue displayed doesn't change.
updated the demo, push missed :-P
Hi @hybrid2102
Sorry it took so long to get to this. I tried your example and to make it work you just had to set the context.CellValue
Example:
<SelectList Data="@allBrands"
TextField="@(i => i.Name)"
ValueField="@(i => i.Id)"
SelectedValue="@((int)((CellEditContext)context).CellValue)"
SelectedValueChanged="@(e =>
{
+ context.CellValue = Convert.ToInt32(e);
} )" />
The reason for this is that context is used as a proxy for edited values. So you need to set it based on the changed value passed from SelectList through the SelectedValueChanged event handler