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>   
  • 相关阅读:
    VS2013 更新系统.net framework4.8引起的datagridview添加列弹框的显示问题
    IIS发布获取apk文件,部署IIS遇到的问题记录
    C# winform 动态构建fastreport报表
    其他信息: 未能加载文件或程序集“WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。找 到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
    winform DataGridView的虚模式填充,CellValueNeeded事件的触发条件
    winform中的小技巧【自用】
    仅当使用了列列表并且 IDENTITY_INSERT 为 ON 时,才能为表'XXX'中的标识列指定显式值。
    VS 2013Ultimate 开发过程中遇到的问题——listbox的隐藏问题,combobox.textchanged的中文问题
    AFO
    几个救了我命的小不等式
  • 原文地址:https://www.cnblogs.com/rockniu/p/1165321.html
Copyright © 2011-2022 走看看