This is a migrated thread and some comments may be shown as answers.

validation for Gridnumeric column

3 Answers 179 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
NVB
Top achievements
Rank 1
NVB asked on 01 Jun 2012, 07:24 PM
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
 
 

3 Answers, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 06 Jun 2012, 02:19 PM
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.
0
NVB
Top achievements
Rank 1
answered on 08 Sep 2012, 03:22 PM
Can you please direct me to the link
Thanks
0
Antonio Stoilkov
Telerik team
answered on 13 Sep 2012, 05:41 AM
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.
Tags
General Discussions
Asked by
NVB
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
NVB
Top achievements
Rank 1
Share this question
or