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

Get Control From RadGrid Template

5 Answers 239 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eng.Bassel Samman
Top achievements
Rank 2
Eng.Bassel Samman asked on 19 Aug 2010, 03:54 PM
Dears,
In radGrid Template I have radcombobox and a button, when user clicks the button I open a radwindow to let hime insert new choice, if user click ok in the radwindow dialog I have to add a new item to radcombobox item.
I am call javascript function in the main page from the dialog. this function fire the ajaxRequest of RadAjaxManger.
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
In the ajaxrequest handler I tried to get the radcombobox of the radgrid template as following:
Dim GridItem As GridDataItem = CType(grdTrngs.EditItems(0), GridDataItem)
Dim cmbDocs As RadComboBox = GridItem.FindControl("cmbTrngsHR_DOCS_ID")
but it didn't work and the FindControl retuen nothing.
So, could you please help in
Thanks in Advance
Best Regards


 

 

 

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 23 Aug 2010, 09:54 AM
Hello Bassel,

Please go through the following help articles and let me know if they help to get the RadComboBox control of the RadGrid template:
Referencing controls in grid row/edit form
Accessing cells and rows

Greetings,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eng.Bassel Samman
Top achievements
Rank 2
answered on 23 Aug 2010, 11:56 AM

 

Hello Pavlina,
I could not find the answer, because the examples in the links are accessing the RadGrid Editing Template's controls via e (event argument), unfortunately I can’t do that because I need to update the radcombobox items after RadWindow closing so I am calling a javascript function in the main page from the dialog. This function fires the ajaxRequest of RadAjaxManger.

$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();

the event arguments of ajaxRequest handler don't have any reference to RadGrid Editing Template's controls.

In my case I have to access the controls without using any event arguments, So I added this thread.

Thanks in Advance
Best Regards

0
Pavlina
Telerik team
answered on 26 Aug 2010, 09:13 AM
Hello,

Check out the following code library submission which explains on how to access the controls embedded inside templates in the grid:
Accessing server controls in a grid template on the client

Regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Eng.Bassel Samman
Top achievements
Rank 2
answered on 29 Aug 2010, 01:10 PM

Dears,
I found and used the Telerik.Web.UI.RadComboBox.ComboBoxes.
In my case I have a radgrid template with one RadComboBox, when I call Telerik.Web.UI.RadComboBox.ComboBoxes (of course in the client side) it returned the RadCombobox control and I managed to update its items.
I tried to get more information about this useful array, but I couldn't. every thing I found was in:
http://www.telerik.com/help/aspnet-ajax/combo_clientsidebasics.html
I need to know:
- If it returns all Radcomboboxes in the RadGrid template, and what it will return if I have to RadGrid and each one of them has its template with more than one combo ?
- Does it return just Radcomboboxes in RadGrid templates ?

Thanks in Advance
Best Regards

0
Pavlina
Telerik team
answered on 01 Sep 2010, 03:53 PM
Hello Bassel,

Telerik.Web.UI.RadComboBox.ComboBoxes can be used to obtain an array containing all the client-side combobox instances. You can review the help articles below for additional information.
http://www.telerik.com/help/aspnet-ajax/combo_clientsideradcombobox.html
http://www.telerik.com/help/aspnet-ajax/find-combobox-client-side-embedded-another-control.html

Kind regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Eng.Bassel Samman
Top achievements
Rank 2
Answers by
Pavlina
Telerik team
Eng.Bassel Samman
Top achievements
Rank 2
Share this question
or