• 在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>   
  • 相关阅读:
    Java method Exception throw with return instance.
    SQL Profiler Practice.
    FTP 文件 循环 Copy
    【SQL遗补】之 SET NOCOUNT (TransactSQL)
    【WinForm窗体控件开发】之三 窗体控件设计时属性Attribute
    【WinForm窗体控件开发】之三续 窗体控件设计时的事件属性
    【WinForm窗体控件开发】之二 简单的窗体控件
    解决删除DataGridView中数据引发的“DataGridView Default Error Dialog 错误”
    .NET开发WinCE程序之使用软键盘(System.WindowsCE.Forms命名空间)兼容WinCE和桌面操作系统之解决方案
    【C#遗补】之Char.IsDigit和Char.IsNumber的区别
  • 原文地址:https://www.cnblogs.com/rockniu/p/1165321.html
Copyright © 2020-2023  润新知