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

[Solved] RadCombobox passing data to RadGrid

3 Answers 179 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Benjamin
Top achievements
Rank 1
Benjamin asked on 21 May 2008, 07:29 AM
I have a RadComboBox with 2 columns in the EditItemTemplate of a RadGrid's TemplateColumn. It uses streaming through ExternalCallBackPage to get its list data.

1.How do I implement a javascript on client side which updates a seperate column of RadGrid with the entry the user has selected. 

2. The streaming tends to take time to load the data over. Is there any way to ensure that the data passing to this seperate column could be done once the loading is complete even after the user has left the control?

3. Right now the ExternalCallBackPage I'm using is having 5 different RadComboBoxes for streaming to the appropriate screens. Is this safe? Will there be any performance improvment if I shift each of the controls to its own individual page?

Thank you.

3 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 26 May 2008, 02:17 PM
Hi Benjamin,

Straight onto your questions:

  1. How to access cells and rows in RadGrid and change the values of controls residing inside them you can learn from the following online resources:

    http://www.telerik.com/demos/aspnet/Grid/Examples/Programming/AccessingCellsAndRows/DefaultCS.aspx
    http://www.telerik.com/help/aspnet-ajax/gridreferencecontrolsinroweditform.html

    The same approach is applicable wiring the SelectedIndexChanged server event of the RadComboBox instance residing inside the template column.
  2. If you select an item from the combobox either by clicking it with the mouse or pressing [Enter], the code which updates the text in the relevant grid column should be processed as expected.
  3. Indeed if you can use a single ExternalCallbackPage to operate with the five RadComboBox instances this will reduce the number of pages which streamline the items loading. Using more pages will neither improve the performance nor will impose a performance penalty.
Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Benjamin
Top achievements
Rank 1
answered on 06 Jun 2008, 02:52 AM
3. What if there are multiple pages using these streaming RadComboboxes?
For example: Suppose one page uses RadComboboxes 1, 3 & 5 on the ExternalCallBackPage page and another page uses 2, 4 & 5.
Will there be any affect to the performance?

I've also found out (the hard way) that I can't have two similar controls on the same page stream from one control on the ExternalCallBackPage. Is there any workaround this without creating a duplicate control on the ExternalCallBackPage?
0
Rosi
Telerik team
answered on 09 Jun 2008, 12:05 PM
Hello Benjamin,

Using single streamer page for several RadComboBoxes should works as expected.

However, you can try the following approach - use only one ExternallCallBackPage without instances of RadComboBox.Then you can add dynamically radcombobox with the same ID as the combobox which request items.

To do this you have to pass additional GET QueryString parameters to the ExternallCallBackPage by adding them directly in the ExternallCallBackPage property.
 
Example:

<telerik:RadComboBox   
    id="RadComboBox1"   
    Runat="server"      
    ExternallCallBackPage="ComboStreamer.aspx?rcbServerID=RadComboBox1" 
    EnableLoadOnDemand="True">      
</telerik:RadComboBox> 

Then you can add the following code to the Page_Init of the ExternallCallBackPage :

Telerik.WebControls.RadComboBox cbo = new Telerik.WebControls.RadComboBox();   
cbo.ID = Request.QueryString["rcbServerID"];   
cbo.ItemsRequested += new Telerik.WebControls.RadComboBoxItemsRequestedEventHandler(cmbMorph_ItemsRequested);   
Page.Controls.Add(cbo);   
 
 
 

Regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Benjamin
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Benjamin
Top achievements
Rank 1
Rosi
Telerik team
Share this question
or