我有一个 GridView
<ext:GridPanel ID="GridPanelRoles" runat="server" StoreID="StoreUserTypes" ForceFit="true"
Title="">
<View>
<ext:GridView ID="GridViewRoles" runat="server" LoadMask="false" />
</View>
<SelectionModel>
<ext:CheckboxSelectionModel ID="CheckboxSelectionModelMemTypes" runat="server" />
</SelectionModel>
<ColumnModel>
<Columns>
<ext:Column ID="col_type_desc" runat="server" DataIndex="description" Text="" />
</Columns>
</ColumnModel>
</ext:GridPanel>
和一家商店
<ext:Store ID="StoreUserTypes" runat="server">
<Reader>
<ext:JsonReader IDProperty="id" />
</Reader>
<Model>
<ext:Model ID="ModelUserTypes" runat="server" IDProperty="id">
<Fields>
<ext:ModelField Name="id" />
<ext:ModelField Name="description" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
我想在 ii 填充网格(通过 c#)之后检查一些行,具体取决于它们的 id(id 没有出现在网格上)。我努力了
CheckboxSelectionModel sm = GridPanelRoles.GetSelectionModel() as CheckboxSelectionModel;
sm.Select(id);
但这不起作用。
我将不胜感激。