Feb 08, 2014, 10:23 AM
[CLOSED] how to get modelfield from RowSelectionModel?
i want to delete the selected rows from RowSelectionModel
protected void DeleteProduct(object sender, DirectEventArgs e)
{
var sr = RowSelectionModel1.SelectedRows;
foreach (var r in sr)
{
var rid = r.RecordID;//here is not the modelfield,how to get the "id" modelfield?
QizProduct qizProduct = _productSerice.Get(int.Parse(rid));
_productSerice.Delete(qizProduct);
}
s_products.Reload();
}
<ext:Store runat="server" ID="s_products" PageSize="20" OnReadData="LoadProducts">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="id"></ext:ModelField>
<ext:ModelField Name="productNo"></ext:ModelField>
<ext:ModelField Name="name"></ext:ModelField>
<ext:ModelField Name="price_source"></ext:ModelField>
<ext:ModelField Name="discount"></ext:ModelField>
<ext:ModelField Name="price"></ext:ModelField>
<ext:ModelField Name="ptype"></ext:ModelField>
<ext:ModelField Name="QizProductType" Type="Object"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
<Proxy>
<ext:PageProxy></ext:PageProxy>
</Proxy>
</ext:Store>
Last edited by Daniil; Feb 14, 2014 at 1:47 PM.
Reason: [CLOSED]