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

Setting Value of Control i

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Poyraz
Top achievements
Rank 1
Poyraz asked on 21 Apr 2011, 02:34 PM
Hi All
I can get the value of a control inside a radgrid cell with javascript with:

        function RowSelected(sender, eventArgs) {
            var grid = sender;
            var MasterTable = grid.get_masterTableView();
            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
            var txtbox = row.findElement("Numeric1");
            var txtboxValue = txtbox.value;
            alert(txtboxValue);
        }
which works great, however when i want to set the value, i cant set it.

Any idea?

İf i use a standart textbox i can set the value by
 row.findElement("TextBox1").value = '15';

 however i am using RadNumericTextbox and it cant set the value as i do with standart textbox


1 Answer, 1 is accepted

Sort by
0
Accepted
Vasil
Telerik team
answered on 22 Apr 2011, 03:16 PM
Hi Poyraz,

After finding the numeric textbox object use its set_value() function to set the value.

Here are listed most important properties of the RadNumericTextBox Client Object:
http://www.telerik.com/help/aspnet-ajax/input-client-side-radnumerictextbox.html

All the best,
Vasil
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Poyraz
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or