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

Cascading Comboboxes in In-Place Edit

11 Answers 289 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Intro
Top achievements
Rank 1
Intro asked on 03 Jun 2008, 11:44 AM
Hi,

The example Multiple comboboxes in in-place edit post does not work with the 2008 Q1 version of the ASP.Net Ajax controls. Can you please suggest a way to achieve this functionality.

Thanks

11 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Jun 2008, 12:09 PM
Hi,

Go through the following demolink.
Accessing cells and rows

Thanks
Princy.
0
Konstantin Petkov
Telerik team
answered on 03 Jun 2008, 12:11 PM
Hello oner,

I have prepared an example and attached it to my response for your convenience. Let us know if further assistance is needed.

Best wishes,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Intro
Top achievements
Rank 1
answered on 04 Jun 2008, 03:48 PM
Thanks for the quick response Konstantin it really helped.

Now there is another problem. There are 3 comboboxes; country, state, city.

In the current state when the user clicks edit button all the countries, states and cities from the database are loaded. The requirement is that only the states that are contained in the country are listed. The country value is in the country combobox. And somehow this has to be accomplished using SqlDataSource without OnNeedDataSource functionality. Can you suggest an approach ?
0
Konstantin Petkov
Telerik team
answered on 06 Jun 2008, 11:49 AM
Hi oner,

Have you managed to implement that? The first idea coming to my mind in this case is to address these requirements through the respective SQL queries. You can use the SqlDataSource control parameters for selection for this purpose. I just found a post about a similar example with DropDownLists here.

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael
Top achievements
Rank 1
answered on 14 Oct 2008, 04:02 PM
Hi,

We require a number of cascading comboboxes within a RadGrid. For example, we need a list of states/regions in one combobox column to change when a new country is selected in another combobox column. We want to use the inline edit within the grid to fit within our screen layout.

We modeled our implementation after the sample code posted in this thread. The cascading comboboxes work great when editing existing records, but they do not work when inserting a new record.

We made the minimum changes necessary to enable inserting in the sample code and found the same issue. The list of items displayed in the second combobox does not change when a new item is selected in the first combobox.

Again looking at the sample, we found that the DataSource for the second combobox reverts to null when DataBind is called in the SelectedIndexChanged event handler method. The combobox appears to display the list of values cached in ViewState. The items displayed in the combobox never change when inserting in the sample code.

After some experimenting with our code, we found that the DataSource for our second combobox would revert to its previous value when we called DataBind on our second combobox in the SelectedIndexChanged event handler method. The correct items would not appear in the combobox until the next postback, resulting in our comboboxes always being out of synch.

Calling DataBind on the second combobox does not produce the same results when inserting a record as it does when editing a record. We are facing a deadline and have already lost time trying to resolve the issue ourselves.

Is it possible to have cascading comboboxes in a grid for both edit and insert functions? Or is there a flaw with how the grid and comboboxes interact during databinding?

Thanks,
Michael
0
Intro
Top achievements
Rank 1
answered on 14 Oct 2008, 05:43 PM
Hi,

We have implemented such a case for our grid. The grid contains 4 cascading comboboxes; country, state, city and town. They work in both edit and insert modes. By the way, the grid uses template forms.

In our case only the country combobox is populated declaratively using a DataSource. The other comboboxes are populated in SelectedIndexChanged event handlers via datatables.

Best Regards,
Oner
0
Michael
Top achievements
Rank 1
answered on 14 Oct 2008, 10:25 PM
Hi oner,

Thank you for the response. While we can workaround the issue with the template form or a web user control, we were hoping to leverage more from the Telerik controls.

The cascading comboboxes work great in one case (edits), but not in another (inserts). This seems to be a limitation of either the RadGrid or the RadComboBox. We are interested in hearing from Telerik on this issue.

Can cascading comboboxes be made to work as implied in the sample code or should we go another route?

Thanks,
Michael

0
IT
Top achievements
Rank 1
answered on 18 Jan 2009, 10:06 PM
Im also having a problem with this using a custom template

any further help available with this>? or solution


regards
0
Sebastian
Telerik team
answered on 21 Jan 2009, 03:58 PM
Hello guys,

If the project provided by my colleague Konstantin in this thread is not sufficient for the functionality you are after, please prepare a working demo show-casing your implementation and send it enclosed to a regular support ticket.  We will test it locally and will advice you further.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
vinay
Top achievements
Rank 1
answered on 27 Mar 2011, 06:26 PM
Hi , 
   i am working on ASP.net  MVC2 and i use to Telerik Combobox like( <% Html.Telerik().ComboBox().Name("State")) this.
   i want to Bind Country And state .when click on Country State is bind......

Please send me code to Implement this project...
i need code in ASP.net MVC..

Thanks
      1. Vinay Kumar 
0
Tim
Top achievements
Rank 1
answered on 22 May 2013, 05:46 PM
The other thing that causes this functionality not to work is if you have Validators on your controls.  If you have validators, make sure to disable the ClientScript (ex. EnableClientScript="False").
Tags
Grid
Asked by
Intro
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Konstantin Petkov
Telerik team
Intro
Top achievements
Rank 1
Michael
Top achievements
Rank 1
IT
Top achievements
Rank 1
Sebastian
Telerik team
vinay
Top achievements
Rank 1
Tim
Top achievements
Rank 1
Share this question
or