[CLOSED] MultiCombo vs Renderer Problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] MultiCombo vs Renderer Problem

    Hello,

    I have a problem of rendering multiple values in Grid panel Multi Combo Column.
    when data binded into Grid panel, the values selected are binded correctly (using renderer function) into Multi combo text area, while weren't checked in (Multi Combo) list.
    While the case wasn't appeared when selecting one value only. (the value checked in combo list).

    Can you help to detect the problem since i revised all forum similar cases with no success.

    I am using C# language as code behind to add a dynamic Multi Combo into EXT Grid Panel as per the below:
                   GridPanel1.ColumnModel.Columns.Add(new ColumnBase[] { 
                                         new Column 
                                        {
                                         Text = fieldDispName,
                                         DataIndex = fieldDBName[i],
                                         ID=fieldDBName[i].Replace(" ", "")+"_COL",
                                         MinWidth=240,
                                         CellWrap=true,
                                         Filter={new StringFilter{ DataIndex=fieldDBName[i] }},
                                         Renderer={ Handler=string.Format("return MultiComboGrid(value, metadata, record, rowIndex, colIndex, store, '{0}')", fieldDBName[i])},
                                         Editor={
    
                                                    new Ext.Net.MultiCombo{
                                                                    
                                                                    ID=fieldDBName[i].Replace(" ", ""),
                                                                    Listeners={Select={Handler="App.direct.SelectionChange('" + fieldDBName[i] + "','540');"} },
                                                                    QueryMode=Ext.Net.DataLoadMode.Local,
                                                                    ForceSelection=true,
                                                                    StoreID=StoresIDs[CombosStoreCount],
                                                                    DisplayField="Name",
                                                                    ValueField="ID",
                                                                    Cls=ControlCLS,
                                                                    TriggerAction=Ext.Net.TriggerAction.All,
                                                                    MultiSelect=false,
                                                                    ListConfig= new BoundList{Cls="list-with-empty"}
                                                                }
                                                }
    
                                        },
                                        });
    And then using a javascript function as a renderer function for Multi Combo column:

    
    
    
    function MultiComboGrid(value, metadata, record, rowIndex, colIndex, store, customParams)
    {
        var cs = listToAray(App.ComboboxesStores.getValue(), '~');
        var mc = listToAray(App.MulticombosIDParam.getValue(), '~');
        var names = [];
        var indexes = [];
    
        if (value != "" && value != null && value != "-") {
            var splited = value.split(",");
            var FinalResults = "";
            var FinalRID = "";
            var arrayLength = splited.length;
            for (var z = 0; z< arrayLength; z++) {
                console.log(splited[z]);
    
    
                if (cs.indexOf(customParams + "_Store") != -1) {
                    
                    var i = cs.indexOf(customParams + "_Store");
                    
                    var script = "var r=App." + cs[i] + ".getById(" + splited[z] + ");";
                    console.log(script);
                    eval(script);
    
                    console.log("name: " + r.data.Name);
                    
                    names.push(r.data.Name);
    
    
                    if(FinalResults=="")
                    {
                        FinalResults = r.data.Name;
                    }
                    else
                    {
                        FinalResults = FinalResults+", "+r.data.Name;
                    }
    
              
    
                } // if (cs.indexOf(customParams + "_Store")
            
            }
    
         
    
            return names.join(",");
         
       
        }
    
        else {
           
            return value;
        }
        
    }
    Waiting your help and thank you dear.
    Last edited by fabricio.murta; Dec 13, 2019 at 2:28 PM.

Similar Threads

  1. MULTICOMBO selecting problem...
    By antoreegan in forum 2.x Help
    Replies: 0
    Last Post: May 22, 2013, 6:10 AM
  2. [CLOSED] when gridpanel column apply renderer.format , renderer.fn not work
    By mis@adphk.com in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 12, 2013, 10:35 AM
  3. [CLOSED] Problem with Renderer & Editor
    By logicspeak in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 20, 2011, 8:18 PM
  4. Replies: 1
    Last Post: Nov 11, 2010, 12:19 PM
  5. [1.0] MultiCombo Problem Selecting
    By koss in forum 1.x Help
    Replies: 4
    Last Post: Apr 15, 2010, 3:31 PM

Posting Permissions