what's the simplest way to display a combobox in a grid? All I need is a box to display an array of numbers (1- 100) so that the end user can select one. It will NOT be saved but rather used in a value for another function. Do I need to use
columnSettings: [{columnKey: "MIN_AGE",editorType: 'combo',required: true,editorOptions: {mode: "dropdown",dataSource: ageJSON,textKey: "Name",valueKey: "ID"
}
}],
Can I use something like var arr = [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]; as the datasource? without the textKey and valueKey?
var arr = [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
I got it to work-- thanks
Hi William
Please would you share with me how you got this to work.
I have a MVC Model coming into the View and have stored the dropdown data in a ViewBag from the Controller.
I need to populate the igGrid with each row of the Model coming in and use the dropdown data to select the type of item in the grid - as per your requirement it won't be saved, but rather used as a flag.
I have now been working through every Infragistics example and cannot seem to get this to work.
Thanks in advance for your help.
What I did and I'm not 100% sure it will help is:
Built my array
var minAge = data.age_range[0].MIN_AGE; var maxAge = data.age_range[0].MAX_AGE; var ageArray = [], end = maxAge, start = minAge, a = end - start + 1; while (a--) ageArray[a] = end--;Attach my array $("#cmbominAge").igCombo({ dataSource: ageArray, width: "150", height: "30" }); $("#cmbomaxAge").igCombo({ dataSource: ageArray, width: "150", height: "30" });
Set the combobox with a value
$("#cmbominAge").igCombo("text", minAge); $("#cmbomaxAge").igCombo("text", maxAge);
Many thanks William.
It didn't help with my issue, but hopefully will assist someone else.
I understand-- In fact many of the issues that have plagued me hear have made me look elsewhere for solutions. It's a shame I purchased the controls but spent more time that it's worth trying to develop an application. The total cost of the controls is how long it takes to make it into production.