Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Validation Summary In UltraWebGrid
posted

In ultrawebgrid I added validation to a cell.

The error message displayed in the cell itself.

But I want the error message to be displayed in the validation summary.

Code: ( asp )
  1. <igtbl:TemplatedColumn HeaderText="No Of Materials" >
  2.                         <Header Caption = "No Of Materials" >
  3.                             <RowLayoutColumnInfo OriginX="2" />
  4.                         </Header>
  5.                         <Footer>
  6.                             <RowLayoutColumnInfo OriginX="2" />
  7.                         </Footer>
  8.                         <Validators >
  9.                             <igtbl:ValidatorItem Value = "NumericValue" />
  10.                             <igtbl:ValidatorItem Value = "reqNoOfMaterials" />
  11.                             <igtbl:ValidatorItem Value = "valSum" />
  12.                         </Validators>
  13.                        
  14.                     </igtbl:TemplatedColumn>
  15.  </igtbl:UltraGridBand>
  16.         </Bands>
  17.     </igtbl:UltraWebGrid>
  18.    
  19. <asp:Button ID = "btnSave" runat = "server" Text = "Save" OnClick="btnSave_Click" Visible="False" ValidationGroup="btnSave" />
  20. </div>
  21.  
  22. <asp:RegularExpressionValidator ID = "NumericValue" ControlToValidate = "uwgEditPrice" ErrorMessage="Invalid" runat = "server" Display = "Static" ValidationExpression = "0*[1-9][0-9]*" ValidationGroup = "btnSave"></asp:RegularExpressionValidator>
  23.  
  24. <asp:RequiredFieldValidator ID = "reqNoOfMaterials" ControlToValidate = "uwgEditPrice" ErrorMessage = "Required" runat = "server" Display = "Static"  ValidationGroup = "btnSave"  ></asp:RequiredFieldValidator>
  25.  
  26. <asp:ValidationSummary ID = "valSum" HeaderText = "Following Error Occured" runat = "server" />
  27. </asp:Content>
Parents
  • 8680
    posted

    A validator's .Text property appears in the validator, and its .ErrorMessage property appears in the summary.

    IIRC, you need to set both, or one will default to the other, (I think).

Reply Children
No Data