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

Get value of sibling combobox on client side in ClientItemsRequesting handler?

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
KN425000
Top achievements
Rank 1
KN425000 asked on 23 Jun 2011, 08:15 PM

I have a RadGrid with two GridTemplateColumn columns, each of which contains a RadcomboBox  within the EditItemTemplate.

I am trying to configure page method-based auto-complete for each combobox.  The first will contain two items (say, "Colors" and "Numbers") and the second will ask a page method for a list of items that are relevant for what was selected in the first combobox; e.g., if the user selects "Colors" from the first combobox, he may only select a color from the second combobox.  Likewise, if he instead selects "Numbers" from the first list, he can only select numbers from the second list.  The page method used by the second combobox takes a parameter which is the value of the selection from the first combobox.

For the second combobox, I am attempting to use the ClientItemsRequesting event handler to set the value of the parameter to the page method a la http://trappedinhoth.blogspot.com/2008/05/telerik-radcombobox-auto-complete.html.
 
The ClientItemsRequesting event handler gives me the sender, which is the second combobox.  From that, how do I get the value of the first combobox?

Thanks

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 27 Jun 2011, 12:26 PM
Hello KN425000,

Thank you for the detailed explanation.

To access the first combobox within the client event handler of the second one, consider using one of the methods presented in the examples below:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridwithtreeviewcomboboxeditors/defaultcs.aspx?product=grid (See the freightComboClientSelectedIndexChangedHandler js method)

http://www.telerik.com/community/code-library/aspnet-ajax/grid/get-value-of-another-control-client-side.aspx

Best regards,
Sebastian
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
KN425000
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or