Dear Team ,Please guide me how to show igcombo as a column in display template of iggrid.Thanks in advance
Hello Bala,
In order to get the selected value from the dropdown, you may handle selectionChanged event and by using ui.items[0].value to obtain reference to the currently selected item.
For instance:
$(".combo").igCombo({
selectionChanged: function (evt, ui) {
var selectedItem = ui.items[0].value;
}
});
Please let me know if you have any further questions.
Sincerely,
Tsanna
Thanks.
I could able to get the see the dropdwon
mistake done is i am rebinding the data once again with another value.
I would like to know how to get the value of selected dropdown from the iggrid
Dear Tsanna,
Thanks for the reply, It is working fine in normal page, however when i try to implement the same in igDialog box it is coming as TextBox instead of dropdown.
Can you please guide me to resolve this issue.
IgGrid Code below:
var states =[ { Id:'1', Name: 'Alabama' } ,{Id: '2', Name: 'California'} ] ; _$moveDisplaysGrid.igGrid({ height: '230px', width: '770px', autoGenerateColumns: false, autoCommit: true, primaryKey: "DisplayKey", columns: [ { headerText: ' ', key: 'DisplayKey', dataType: 'string', width: '0px', hidden: true }, { headerText: ' ', key: 'ComboType', dataType: 'string', width: '30px', formatter: _makeFlagFormatter }, { headerText: "", key: "Combo", dataType: "string", width: "50%", unbound: true, template: "<input class='combo' />" } ], rendered: function () { $(".combo").igCombo({ dataSource: states, textKey: "Name", valueKey: "Id", width: "200px", autoComplete: true }); } }); },
Attached screenshot for your reference.
Thanks in Advance
Thank you for posting in our community.
I'm attaching a sample that demonstrates how to insert igCombo into a column using igGrid column template functionality.
Please note that the igCombo widget is defined inside igGrid rendered event in order to make sure that the whole grid widget has been rendered properly and the combo template will be displayed for every row.
If you have any further questions, feel free to contact me.