FineUI 官方论坛
标题:
关于grid,在前台判断DropDownList不允许输入相同的值
[打印本页]
作者:
Sunset、
时间:
2013-1-4 08:48
标题:
关于grid,在前台判断DropDownList不允许输入相同的值
[attach]1550[/attach]
怎么样在前台判断同一个尺码组不允许输入相同的尺码名称,在选择完尺码名称后,如果选择了相同的尺码,弹出提示信息!下面判断排序只能输入数字一样!!!
下面是代码:
<Regions>
<ext:Region ID="Region_Main" runat="server" ShowBorder="true" ShowHeader="false" Margins="5px" Layout="Fit">
<Items>
<ext:Grid ID="Grid_SizeComb" runat="server" EnableCheckBoxSelect="true" EnableRowNumber="true" ShowBorder="false" ShowHeader="false" AllowPaging="false" DataKeyNames="fchrID">
<Columns>
<ext:TemplateField HeaderText="尺码组" Width="130px">
<ItemTemplate>
<asp
abel ID="txt_SizeGroupName" runat="server" Width="100%" Text='<%# Eval("fchrSizeGroupName") %>' TabIndex='<%# Container.DataItemIndex + 1 %>'></asp
abel>
</ItemTemplate>
</ext:TemplateField>
<ext:TemplateField HeaderText="尺码名称" Width="90px">
<ItemTemplate>
<asp
ropDownList ID="ddl_SizeName" runat="server" Width="100%" TabIndex='<%# Container.DataItemIndex + 1 %>'>
</asp
ropDownList>
</ItemTemplate>
</ext:TemplateField>
<ext:TemplateField HeaderText="排序号" Width="130px">
<ItemTemplate>
<asp:TextBox ID="txt_SortNo" runat="server" Width="100%" CssClass="gridinput" Text='<%# Eval("fintSortNo") %>' TabIndex='<%# Container.DataItemIndex + 1 %>'
onkeypress="stopKey();"
style="ime-mode:disabled"></asp:TextBox>
</ItemTemplate>
</ext:TemplateField>
</Columns>
</ext:Grid>
</Items>
<Toolbars>
<ext:Toolbar ID="Toolbar_Main" runat="server" Position="Top">
<Items>
<ext:Button ID="Btn_AddDetail" runat="server" Text="新增明细" Icon="TableRowInsert" EnableAjaxLoading="false"></ext:Button>
<ext:ToolbarSeparator ID="Sep_AddDetail" runat="server"></ext:ToolbarSeparator>
<ext:Button ID="Btn_DeleteDetail" runat="server" Text="删除明细" Icon="TableRowDelete" EnableAjaxLoading="false"></ext:Button>
<ext:ToolbarSeparator ID="Sep_DeleteDetail" runat="server"></ext:ToolbarSeparator>
<ext:Button ID="Btn_Save" runat="server" Icon="SystemSave" Text="保存"></ext:Button>
<ext:ToolbarSeparator ID="Sep_Save" runat="server" Hidden="true"></ext:ToolbarSeparator>
<ext:Button ID="Btn_Query" runat="server" Text="查询" Icon="magnifier" EnablePostBack="false" Hidden="true"></ext:Button>
<ext:ToolbarFill runat="server"></ext:ToolbarFill>
<ext:TwinTriggerBox ID="txt_Query" runat="server" Trigger1Icon="Clear" ShowTrigger1="false" EmptyText="关键字" Trigger2Icon="Search"></ext:TwinTriggerBox>
</Items>
</ext:Toolbar>
</Toolbars>
</ext:Region>
</Regions>
<script type="text/javascript">
function stopKey() {
if ((event.keyCode >= 97 && event.keyCode <= 122) || event.keyCode == 13) {
event.returnValue = false;
}
}
</script>
作者:
Next...
时间:
2013-1-5 07:43
同求。。。
欢迎光临 FineUI 官方论坛 (https://fineui.com/BBS/)
Powered by Discuz! X3.4