Code behinde rendered MultiCombo with selected items not working Ext.net 2.5.3.1

  1. #1

    Code behinde rendered MultiCombo with selected items not working Ext.net 2.5.3.1

    Hi,
    I'm rendering a Multi Combo in a propertyGrid all render with data and selected items happens in C# Codebehind, When the page loads it renders all items in the Multi Combo when I click to show the items list for the Multi Combo but no selected items shown only the value in the textfield, when I click a way from the Multi Combo and click again to show the list then I see the selected items are "Checked" but not selected "Highlighted", when I click on one list item all the old values disappears and get overridden by the new one. I tried to make it work in many ways but I couldn't make it work.

    When I made a look at the browsers Developer Console "Chrome" I realized that the items list "Bound list" is not rendered from the beginning only then when I click to focus on the Multi Combo, but with no selected items, then when I click a way the and click again on the Multi Combo the bound list disappears and a new one appears with "Checked items" not selected, and the issue with the value override as described above consists alla the time.

    I made a Javascript selection code to make the selection just to show you that it is missing somehow, but it make te selection right

    Here is some code:
    <ext:Container ID="ContainerProperty" runat="server" Layout="FitLayout">
    	<Items>
    		<ext:PropertyGrid ID="PropertyGrid_EditUser" runat="server" NameColumnWidth="250" Title="<%$ Lang: Properties %>" />
    	</Items>
    </ext:Container>
    var comboPlugins = new Ext.Net.MultiCombo();
    		if (companyProp != null)
    			parameter.Value = companyProp.PropertyValue.Replace("|", ",");
    
    			var setValues = parameter.Value.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries).ToList();
    
    			if (prop.PropertySelections != null)
    			{
    				var propSelections = prop.PropertySelections;
    				int propIndex = 0;
    				foreach (PropertySelection propSel in propSelections)
    				{
    					var listItem = new Ext.Net.ListItem(Tools.GetLangText(propSel.SelectionValue), propSel.SelectionKey, propIndex);
    					comboPlugins.Items.Add(listItem);
    					if (setValues.Any(sv => sv.ToLower() == listItem.Value.ToLower()))
    					{
    						comboPlugins.SelectedItems.Add(listItem);
    					}
    						propIndex++;
    					}
    				}
    
    			comboPlugins.ID = "ComboEditCompPlugins_" + prop.PropertyId;
    			comboPlugins.SelectionMode = Ext.Net.MultiSelectMode.All;
    Javascript for selection:
    $(document).on('click', '.x-form-item-input-row', function () {
    	if ($('.x-mcombo-item-checked')) {
    		$('.x-mcombo-item-checked').parent().addClass('x-boundlist-selected');
    	}
    });
    Attached Thumbnails Click image for larger version. 

Name:	multicombo1.png 
Views:	78 
Size:	7.8 KB 
ID:	24369   Click image for larger version. 

Name:	multicombo2.png 
Views:	79 
Size:	16.4 KB 
ID:	24370   Click image for larger version. 

Name:	multicombo4.png 
Views:	80 
Size:	18.8 KB 
ID:	24372   Click image for larger version. 

Name:	multicombo3.png 
Views:	88 
Size:	21.5 KB 
ID:	24373  
    Last edited by eagleOne; Dec 21, 2015 at 7:17 AM.

Similar Threads

  1. [CLOSED] How to get the selected items from a multicombo via js
    By arjunrvasisht in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 01, 2015, 5:03 AM
  2. Replies: 1
    Last Post: Dec 03, 2013, 2:18 AM
  3. [CLOSED] Multicombo created dynamically not showing selected items
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 10, 2013, 11:38 AM
  4. MultiCombo not returning any selected items
    By dtamils in forum 1.x Help
    Replies: 3
    Last Post: Feb 27, 2013, 3:56 AM
  5. Replies: 0
    Last Post: Sep 19, 2011, 11:11 AM

Tags for this Thread

Posting Permissions