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

Problem in implementing Multi column Combo box with checkboxes and Item Request event

3 Answers 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 16 May 2013, 07:01 PM
I have a scenario where i have to implement a multi column  Combobox with checkboxes and ItemsRequested event.

With the help of this example 
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx, i am generate Multi Column Combobox with checkboxes, but i am facing trouble when assigning the data source on item request event. I am loosing the datasource on button click event, so not able to figure out which items are selected.

Any help will be appreciated.

Thanks

3 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 22 May 2013, 06:15 AM
Hi,

There are two approaches which you could use:
  1. the first one is to use the combo's built-in check boxes and add image by using ImageUrl property. I'm attaching small sample demonstrating how to achieve that.
  2. the other approach where templates are used (as in the demo) you will need to store selected items manually. For example you could keep them in a hidden filed and restore them again after post back.

All the best,
Hristo Valyavicharski
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jerry
Top achievements
Rank 1
answered on 07 Jun 2013, 08:02 PM
Hi Hristo ,
            That helped thanks. I am facing one more issue.
On item request event max  we are binding 10 items, when we scroll in combo box to get next set of items,
they are getting binded to combo box but the the checkboxes ClientIds are starting from 0 again.
So we are not able to figure out which checkbox is selected as there multiple checkboxes with same ClientIds.

 for (var i = 0; i < items.get_count(); i++)
                    {
                         var item = items.getItem(i);
                         var chk1 = $get(combo.get_id() + "_i" + i + "_chk1");
                   }

Any help will be appreciated.

Thanks


0
Hristo Valyavicharski
Telerik team
answered on 12 Jun 2013, 03:17 PM
Hi Jerry,

In the provided sample, it is demonstrated how you could achieve a unique ClientID for each RadComboBoxItem. Please find it attached.

Hope this would help.

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Jerry
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Jerry
Top achievements
Rank 1
Share this question
or