validation for Gridnumeric column

4 posts, 0 answers
  1. NVB
    NVB avatar
    39 posts
    Member since:
    Apr 2009

    Posted 01 Jun 2012 Link to this post

    I  have about 4 columns in RADGRID which I am defining as GRIDNUMERICColumn with following
     

    <telerik:GridNumericColumn DataField="AMT1" UniqueName="AMT1 HeaderText="Amount1" 

    DataType="System.Int32" DataFormatString="{0:N0}" DecimalDigits="0"

     

    ForceExtractValue="Always" SortExpression="AMT1" AllowFiltering="false" EmptyDataText="0"

     

    Aggregate="Sum" FooterAggregateFormatString="{0:c0}" FooterStyle-HorizontalAlign="Right" >

     

    <ItemStyle HorizontalAlign="Right" />

     

    </telerik:GridNumericColumn>



    Also I have to total column next to it as  GridCalculatedColumn

    AMT1   AMT 2  AMT3   AMT4    TOTAL

    I nee to attach  a validator ( client and Server )  to validtate that in edit mode the when user enters the amounts , it should give message if the total goes negative .

    As of now i am handling  programmtically when updating I am reading the values and giving message below the grid that there is error . This may be not a efficinet way and this has lot of limitations when i am multirowedit

    Can you pleas tell  how to do  client side validation and  server validitaion ( custome validator)

    Thanks for your help
     
     
  2. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 06 Jun 2012 Link to this post

    Hello Vemula,

    In order to achieve your scenario you could take a look at the demo and help article provided below. Additionally, client-side validation is not a trivial implementation but you could implement custom JavaScript logic in order to calculate the values from the RadNumericTextBox controls and if the value is bigger than the expected you could show the message to the user.

    Greetings,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. NVB
    NVB avatar
    39 posts
    Member since:
    Apr 2009

    Posted 08 Sep 2012 Link to this post

    Can you please direct me to the link
    Thanks
  4. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 13 Sep 2012 Link to this post

    Hi,

    The help article and demo below describes how RadGrid validation could be achieved:

    All the best,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top