Ext.net中的GridPanel启用编辑后页面编辑了但是数据库没变

qq_19747643 2015-09-14 09:37:28
这是我的源码:
<form id="form1" runat="server">
<ext:ResourceManager runat="server" />
<ext:FormPanel runat="server" ID="extForm" BodyPadding="15" Width="800">
<Items>
<ext:TextField runat="server" ID="txtGoodsNo" FieldLabel="商品编号"></ext:TextField>
<ext:TextField runat="server" ID="txtGoodsName" FieldLabel="商品名称"></ext:TextField>
<ext:TextField runat="server" ID="txtMarketPrice" FieldLabel="市场价格"></ext:TextField>
<ext:TextField runat="server" ID="txtSalePrice" FieldLabel="销售价格"></ext:TextField>
<ext:TextField runat="server" ID="txtProcurementPrice" FieldLabel="采购价格"></ext:TextField>
</Items>
<Items>
<ext:Button runat="server" ID="btnSelect" Text="查询">
<DirectEvents>
<Click OnEvent="btnSelect_Click">
<EventMask ShowMask="true" Msg="Verifying..." MinDelay="500" />
</Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:FormPanel>
<ext:GridPanel runat="server" ID="grid" ColumnLines="true" Width="800" Height="300">
<Store>
<ext:Store runat="server" ID="storeUserInfo" PageSize="5">
<Model>
<ext:Model ID="UserInfoModel" runat="server" IDProperty="ID">
<Fields>
<ext:ModelField Name="GoodsNo"></ext:ModelField>
<ext:ModelField Name="GoodsName"></ext:ModelField>
<ext:ModelField Name="Unit"></ext:ModelField>
<ext:ModelField Name="MarketPrice"></ext:ModelField>
<ext:ModelField Name="SalePrice"></ext:ModelField>
<ext:ModelField Name="ProcurementPrice"></ext:ModelField>
<ext:ModelField Name="CreateTime"></ext:ModelField>
<ext:ModelField Name="Memo"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:RowNumbererColumn runat="server" Width="25"></ext:RowNumbererColumn>
<ext:Column runat="server" ID="columnNo" Width="100" Text="商品编号" DataIndex="GoodsNo" Flex="1">
<Editor>
<ext:TextField runat="server"/>
</Editor>
</ext:Column>
<ext:Column runat="server" ID="columnGoodsName" Width="100" Text="商品名称" DataIndex="GoodsName">
<Editor>
<ext:TextField runat="server"/>
</Editor>
</ext:Column>

<ext:Column runat="server" ID="columnUnit" Width="100" Text="数量单位" DataIndex="Unit">
<Editor>
<ext:TextField runat="server"/>
</Editor>
</ext:Column>
<ext:Column runat="server" ID="columnMarketPrice" Width="100" Text="市场价格" DataIndex="MarketPrice">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:Column runat="server" ID="columnSalePrice" Width="100" Text="销售价格" DataIndex="SalePrice">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:Column runat="server" ID="columnProcurementPrice" Width="100" Text="采购价格" DataIndex="ProcurementPrice">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:Column runat="server" ID="columnCreateTime" Width="100" Text="创建时间" DataIndex="CreateTime">
<Editor>
<ext:DateField runat="server" AllowBlank="false" Format="MM/dd/yyyy" MinDate="01.01.2006"
MinText="Can not have a start date before the Company existed." MaxDate="<%# DateTime.Now %>"
AutoDataBind="true" />
</Editor>

</ext:Column>
<ext:Column runat="server" ID="cloumnMemo" Width="100" Text="备注" DataIndex="Memo">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>

</Columns>
</ColumnModel>
<Plugins>
<ext:RowEditing runat="server" ClicksToEdit="1"></ext:RowEditing>
</Plugins>

<Plugins>
<ext:CellEditing runat="server" ClicksToEdit="1"></ext:CellEditing>
</Plugins>

<BottomBar>
<ext:PagingToolbar runat="server" ID="gridPaging" StoreID="storeUserInfo"></ext:PagingToolbar>
</BottomBar>
</ext:GridPanel>

</form>


页面效果是这样的,可以编辑,但是样式错位,而且刷新后数据又是原来的了


...全文
246 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

1,978

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧