开发者

asp label visible false and true in telerik grid depends on combo box selected item

开发者 https://www.devze.com 2022-12-16 17:40 出处:网络
depends on theselected telerik combox item i would like to display the label name and text box when im writing the code like this in aspx page

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..


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

0

精彩评论

暂无评论...
验证码 换一张
取 消