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

Update EditForm TextBox at Client side

2 Answers 208 Views
Grid
This is a migrated thread and some comments may be shown as answers.
sweta
Top achievements
Rank 1
sweta asked on 30 Jan 2013, 11:43 AM

Hello,

I'm using Dynamic Edit Form Template for editing in RadGrid. I have a custom control created to Combine a RadTextBox and a Button.
This control populated on Edit Form when I click on edit/insert button. When I click on button a pop-up window opens through Javascript code. From the Popup window I select one record and click on save and Close button of popup window. The string which is returned from the popup window is stored back in the TextBox control using AjaxPostback method. But doing this I lost my other controls selected values.

Ex. I have three controls on my edit/insert form. When we insert new record Two dropdowns and one my custom control [textbox with button] is populated. I select values in two dropdowns and then click on popup button. When the value is stored back in my textbox from popup window I lost my selection in two dropdowns. I'm not getting how to keep those values selected in my dropdowns.

To resolve the this issue I thaught to update my textbox at client side so that ajaxpostback will not occur and I do not lost my selected values from the dropdowns and other controls. But I can not access my Textbox of edit form through javascript. I tried to use

var
editedItemsArray = grid.get_editItems();

But i dont know how to access my TextBox1 from this editeditemsArray.

Please advise.

Sweta

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 30 Jan 2013, 12:50 PM
Hello,

Access RadGrid on client

Please check title in above link.
Access Control in Edit mode (get control using ID)
Get Template Column Control (get control using ID)
Access Column Text  (get control using tag name)

Thanks,
Jayesh Goyani
0
sweta
Top achievements
Rank 1
answered on 30 Jan 2013, 01:03 PM

Hello Jayesh,

I have already referred this thread. I'm using below code.

var masterTable = $find("<%= rdgContactImpactTime.ClientID %>").get_masterTableView();

//gets the HTML object of the insert item opened in the current GridTableView

var insertedItem = masterTable.get_insertItem();

I'm getting object as insertedItem. But i'm not getting how to fetch control Object. For Example I have control Id 'TextBox1' and I want TextBox1 as Object in my code.

Sweta



Tags
Grid
Asked by
sweta
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
sweta
Top achievements
Rank 1
Share this question
or