zoukankan      html  css  js  c++  java
  • 在GridView验证时,提示行号

    <pbcrm:PBCRMGridView ID="gvCustomer" runat="server" 
                        AllowPaging
    ="false" AllowSorting="false"
                        EnableViewState
    ="false" DataSourceID="sqldsClientList"  
                        DataKeyNames
    ="HolderKey"                     
                        AutoGenerateColumns
    ="False" Width="99%">
                        
    <Columns>                      
                           
    <asp:BoundField DataField="CustomerName" HeaderText="Client Name" ReadOnly="True" SortExpression="CustomerName" />
                          
    <asp:BoundField DataField="Nationality" HeaderText="Nationality" ReadOnly="True" SortExpression="Nationality" />
                          
    <asp:BoundField DataField="YearofBirth" HeaderText="Year of Birth" ReadOnly="True" SortExpression="YearofBirth" />
                          
    <asp:BoundField DataField="Age" HeaderText="Age" ReadOnly="True"  SortExpression="Age" />
                          
    <asp:BoundField DataField="IsPI" HeaderText="PI Status" SortExpression="IsPI" />            
                          
    <asp:TemplateField>
                                
    <headertemplate>
                                    Education Level
                                
    </headertemplate>
                                
    <itemtemplate>                                
                                    
    <pbcrm:EducationLevelDDL  ID="ddlEduLevel" runat="server" 
                                        SelectedValue
    ='<%#Eval("EduLevel") %>'/>
                                    
    <pbcrm:PBCRMRequiredFieldValidator ID="rfvEduLevel"  
                                            ControlToValidate
    ="ddlEduLevel"                                         
                                            ErrorMessage
    = '<%#"Education Level for client " + (Container.DataItemIndex + 1).ToString() + " is required"%>'
                                            runat="server"  Display="None"/>
                                
    </itemtemplate>                            
                            
    </asp:TemplateField>
                            
                            
    <asp:TemplateField>
                                
    <headertemplate>
                                    Visually Impaired
                                
    </headertemplate>
                                
    <itemtemplate>                                
                                    
    <pbcrm:VisuallyImpairedDDL ID="ddlVisualImp" runat="server" 
                                      SelectedValue
    ='<%#Eval("VisualImp") %>'/>
                                    
    <pbcrm:PBCRMRequiredFieldValidator ID="rfvVisualImp"  
                                            ControlToValidate
    ="ddlVisualImp" 
                                            ErrorMessage
    = '<%#"Visually Impaired for client " + (Container.DataItemIndex + 1).ToString() + " is required"%>'
                                            runat="server"  Display="None"/>
                                
    </itemtemplate>                           
                            
    </asp:TemplateField>                      
                        
    </Columns>
                    
    </pbcrm:PBCRMGridView>   
  • 相关阅读:
    jQuery.ajax()方法笔记
    Docker安装
    Linux下Nginx+keepalived实现高可用
    Linux安装Nginx
    Redis主从、哨兵、Cluster特性
    Linux搭建redis集群
    Linux搭建redis单机
    HashMap知识总结(jdk1.8)
    如何避免form提交进行页面跳转
    异步上传文件,jquery+ajax,显示进度条
  • 原文地址:https://www.cnblogs.com/rockniu/p/1165321.html
Copyright © 2011-2022 走看看