Telerik 网格中的 asp 标签可见 false 和 true 取决于组合框所选项目
取决于所选的 telerik 组合框项目,当我在 aspx 页面中编写这样的代码时,我想显示标签名称和文本框
<telerik:GridTemplateColumn DataField="DeductionCode" Visible="false" UniqueName="DeductionCode" HeaderText="DeductionCode">
<ItemTemplate>
<asp:Label runat="server" Visible="false" ID="lblDeductionCode" Text='<%# Eval("DeductionCode") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadTextBox ID="txtDeductionCode" Visible = "false" runat="server" Text='<%# Bind("DeductionCode") %>' MaxLength="2"></telerik:RadTextBox>
<asp:RequiredFieldValidator ControlToValidate="txtDeductionCode" ID="rfvtxtDeductionCode" Display="Dynamic" runat="server" ></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator id="revtxtDeductionCode"
ControlToValidate="txtDeductionCode"
ValidationExpression="^[a-zA-Z0-9'`-´\s]{2}$"
Display="Dynamic"
ErrorMessage="Please Enter 2 charecters only"
runat="server"
SetFocusOnError="True" />
</EditItemTemplate>
</telerik:GridTemplateColumn>
当我尝试在 page_load lbldeduction= false 上编写时,标签名称显示错误消息..另一种方式我试图在编译时在 selectedindexed 函数中显示可见 false 和 true,显示错误,如 lbldeductioncode 具有空值,但 texbox 工作正常,如可见 false 和 true ..唯一的问题是我无法执行标签名称可见 false 和之后选定的组合框项目标签名称可见 true..
depends on the selected telerik combox item i would like to display the label name and text box when im writing the code like this in aspx page
<telerik:GridTemplateColumn DataField="DeductionCode" Visible="false" UniqueName="DeductionCode" HeaderText="DeductionCode">
<ItemTemplate>
<asp:Label runat="server" Visible="false" ID="lblDeductionCode" Text='<%# Eval("DeductionCode") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadTextBox ID="txtDeductionCode" Visible = "false" runat="server" Text='<%# Bind("DeductionCode") %>' MaxLength="2"></telerik:RadTextBox>
<asp:RequiredFieldValidator ControlToValidate="txtDeductionCode" ID="rfvtxtDeductionCode" Display="Dynamic" runat="server" ></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator id="revtxtDeductionCode"
ControlToValidate="txtDeductionCode"
ValidationExpression="^[a-zA-Z0-9'`-´\s]{2}$"
Display="Dynamic"
ErrorMessage="Please Enter 2 charecters only"
runat="server"
SetFocusOnError="True" />
</EditItemTemplate>
</telerik:GridTemplateColumn>
when im trying to write the on page_load lbldeduction= false the label name is displaying error message..another way i trying to visible false and true in selectedindexed function on compiling time displaying the error like lbldeductioncode is having null value but texbox is working fine like visible false and true..only the problem is i cant able to do the label name visible false and after selected combox item label name visible true..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 Telerik 网站上找到了一个演示,可以让您在实施方面取得领先 - 看看它 此处。
迪克
I found a demo on the Telerik site that can give you a head start with your implementation - take a look at it here.
Dick