how to get valueMap of a field in listGrid

Hi

I am having a listGrid one of the column is of type comboBox.
Now the valueMap of this comboBox is getting populated dynamically and the value map of same field is different for different rows.
i.e valueMap of row1 field1 will have certain set of values
and valueMap of row2 field1 will have different set of values. I populate them dynamically at rowEnter event.

Once my combo is populated my array of values is set to null.

Now i want to get this valueMap again from the comboBox. How can i do it ?
Is there any way by which i can get the valueMap as i am able to get the value by doin - grid.getCellValue(rowInfo, romNum, colNum)

Thnx …

The list of values gets lost? Do you remember where you saw them last? :wink:

Try overriding setEditorValueMap() to apply a valueMap dynamically.

set valueMap dynamically

Hi,

I have tried to set valueMap dynamically. I dont know how implement the setValueMap or setEditorValueMap method. Please check the code below.

var manualCustRef = new Array();
common_masters_codeDS.fetchData({masterName:'ClientProductIDMSRef', fieldName:'MANUAL_CUST_REFER'},
	function (dsResponse, data) { manualCustRef = data.getValueMap("code", "description"); }

isc.ListGrid.create({
		ID:"IDMSRefList",
	    canEdit:true,
		dataSource:"masters_clientproducts_IDMSRefDS",
	     fields:[
	        { name:"referenceType", type:"text", title:"Type", canEdit:false, width:140},
	        { name:"customerReference",editorType:"comboBox", title:"Customer Reference"},
	        {title:"Bank Reference", name:"bankReference", type:"text"}
	    ],
	    width:600,
	    height:140,
	     setEditorValueMap: function (fieldID, map)
		{
			map = manualCustRef;					
		}
	})

Scenario: I have four different types of reference type. For every ref type, the customer ref and bank ref are different valueMaps.

Please let me know how i can implement this? I am struggling for long time. It would great if you give some suggestions.

Thanks
Prabu P

@Prabu: you look like you are slowly re-inventing the built-in feature of “optionDataSource”. Take a look at the docs and samples for that.