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

Grid header with RadNumericTextBox and button

6 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
R
Top achievements
Rank 1
R asked on 13 Nov 2008, 05:02 PM
Hi i have a telerik grid and in the header i have a  RadNumericTextBox + button
Now all i want is if i enter a value of 6 in the RadNumericTextBox  header (name = txtqtyheader) and onclick i want to populate all the items in coloumn[5] which also has a RadNumericTextBox (name = txtqtyitems)


Can you guys show me how to do this on click of the button

6 Answers, 1 is accepted

Sort by
0
Missing User
answered on 13 Nov 2008, 05:17 PM
Hello RISHI,


Please find attached a sample web application that demonstrates the needed approach.

Regards,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
R
Top achievements
Rank 1
answered on 13 Nov 2008, 07:13 PM
Hi Plamen i really do appreciate your help i need a a bit more help. In your solution i want to add 2 more coloums 1 checkbox and the other bound data coloimn named SETS values 2,4,1,
what needs to happen on the button click in the header is i want to work out for the items which have been checked is get the value from the header and divide by databound coloumn SETS but only divide if value is more than 1

so if i put 12 in the header and click on the button the items will be 6,3,1

Can this be done in javascript?

Thanks

Rishi
0
Accepted
Missing User
answered on 14 Nov 2008, 09:48 AM
Hi RISHI,


You can use get_dataItems(). It is important, that this method will create all RadGrid client side items, which might lead to a performance penalty if RadGrid displays too many items in one page. Please find attached a sample web application that demonstrates the needed approach.

More about the client side API of the control you can learn from the Client-side API reference section in the grid documentation:
http://www.telerik.com/help/aspnet-ajax/grdgettingfamiliarwithclientapi.html


Sincerely yours,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
R
Top achievements
Rank 1
answered on 14 Nov 2008, 10:37 AM
Thank you Plamen I really appreciate it.
0
R
Top achievements
Rank 1
answered on 14 Nov 2008, 11:41 AM
Hi Plamen , I noticed 1 thing it does not work in firefox any reason why?

Is there any way to capture if any item textboxes have remainder (not a whole number) give warning next to the item that we will round the value up for that item checked?

i will show a max of 25 items in the grid.

Thanks

Rish



0
Missing User
answered on 17 Nov 2008, 02:29 PM
Hi RISHI,

Up to the questions:

1) We have modified the sample application to incorporate the changes necessary for FF. Please review it and let us know how it goes.

2) The JavaScript Modulus Arithmetic operator returns the remainder left after division. Here is an example:

 
var a = 70 % 16; 
(a is now equal to 6, since the remainder left 
after dividing 70 by 16 is 6) 
var b = 64 % 8; 
(b equals 0) 



Sincerely yours,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
R
Top achievements
Rank 1
Answers by
Missing User
R
Top achievements
Rank 1
Share this question
or