我有一个 Datagridview,其中有一列有一个组合框作为编辑控件。假设我在第一行的组合框中选择值 X。当我打开第 2 行中的组合框时,即使值 X 不是组合框列表中的第一项,它也会选择值 X 作为默认值(当组合框在编辑前为空时)。为什么它不选择第一个项目(如果它仍然想选择一个项目)?
我不知道它是否相关,但网格和组合绑定到 Linq2sql 对象。
I have a Datagridview with a column that has a combobox as editing control. Say I choose value X in the combobox in the first row. When I open the combobox in row 2 it will select value X as default (when the combobox was empty before edit), even if value X isn't the first item in the list of the combobox. Why doesn't it select the first item (if it wants to select an item anyway)?
I don't know if it is relevant, but the grid and the combo are bound to Linq2sql objects.
发布评论