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

ComboBox Challenge

3 Answers 79 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Philip Senechal
Top achievements
Rank 1
Philip Senechal asked on 04 Aug 2008, 08:26 PM
I have spent too much time trying to figure this out and I can't seem to get it to work, so I'm going to throw out a challenge :)

I have a simple RadGrid that contains one column, Employee Name that is drawn from a table called tUser. The value drawn is the employee ID which I convert to Employee Name through a left join in the SQL. When you click on Edit, the column changes to a drop-down column. The value for the list is the employee ID, the text for the list is the employee Name. These values are in a SQL table called tEmployee, but the selected value should be the one from tUser.

So this is all working fine...exactly the way I want, except for the fact that the tEmployee table contains 3000 entries. So I'd like to take this and apply the load on demand and filter=contains features of RadComboBox to it.

I can't seem to figure out how to combine these two things into a working control.

Any help? Thanks

3 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 06 Aug 2008, 06:39 AM
Hello Philip ,

Please see our online example Combo in Grid. In this example RadComboBox uses the LoadOnDemand feature. All you need to do is to set its Filter property.

Regards,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Philip Senechal
Top achievements
Rank 1
answered on 06 Aug 2008, 04:21 PM
The problem with this example is that is still loads the combobox with the entire dataset, so upon editing or adding a new record, the combo box loads all 3000+ values.

Is there a way to make it so that when adding a new record or editing an existing one, it only loads like 10 records at a time instead of the entire dataset.

I tried using the load on demand example, but that doesn't seem to work when you set a datasource and selectedvalue in the combobox tag.

Thanks.
0
Rosi
Telerik team
answered on 08 Aug 2008, 11:39 AM
Hi Philip ,

Please find the attached modified project. You can download it and test it.

Regards,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Philip Senechal
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Philip Senechal
Top achievements
Rank 1
Share this question
or