When I use the example for the jquery grid the combo dropdown works on the editing of a column however when I use the MVC helper it does not and instead when editing the column it renders as a textbox.
I've tried running both examples side by side in the same web page to ensure it wasn't something to do with the script loading of jquery/infragistics or the type differences but still it only works on the jQuery version.
Here is how I'm instantiating my mvc grid.
<div class="row col-sm-12 col-lg-12 col-md-12"> @(Html.Infragistics() .Grid(Model.UserVms) .ID("igGrid") .Width("100%") .AutoGenerateColumns(false) .AutoCommit(true) .PrimaryKey("UserName") .UpdateUrl(Url.Action("UsersSaveData", "UsersManagement")) .AggregateTransactions(true) .Columns(column => { column.For(x => x.UserName).HeaderText("Username"); column.For(x => x.Email).HeaderText("Email");.... column.For(x => x.PostCode).HeaderText("Postcode"); column.For(x => x.Gender).HeaderText("Gender").DataType("number").FormatterFunction("formatGenderColumn"); column.Unbound("Delete").HeaderText("").Formula("getDeleteBtnTemplate").UpdateMode(UnboundValuesUpdateMode.Auto); }) .Features(f => { f.Paging() .PageSize(15) .ShowPageSizeDropDown(false); f.Updating().ColumnSettings(cs => { cs.ColumnSetting().ColumnKey("UserName").Required(true).TextEditorOptions(o => o.ValidatorOptions(vo => vo.LengthRange(4))); cs.ColumnSetting().ColumnKey("Delete").ReadOnly(true);
cs.ColumnSetting() .ColumnKey("Gender") .EditorType(ColumnEditorType.Combo) .ComboEditorOptions(wrapper => wrapper .Mode(ComboMode.DropDown) .DataSource(Model.Genders) .ValueKey("Key") .TextKey("Value")); }); f.Updating() .EditMode(GridEditMode.Cell) .EnableAddRow(true) .EnableDeleteRow(false) .DeleteRowLabel("Delete"); }) .DataBind() .Render())</div>
When inspecting the generated jQuery from this, it seems to be setting everything as is in the following jsfiddle jQuery example - jsfiddle.net/.../
Here is the jQuery output - http://pastebin.com/RmvzqSkR
Hello Singh,
I am glad you resolved your primary issue.
I tested the scenario you described - combo in dropdown mode with the latest jQuery and it works correctly on my side - http://jsfiddle.net/oL13c661/. Could you provide a JSFiddle sample demonstrating your issue?
I am looking forward to hearing from you.
That very nicely fixes my first issue where using the MVC helper instead of jQuery the editor for the Gender field was not coming up as a dropbox.
Although the jQuery version bug is obviously still there and with the latest jQuery version you are unable to select from a combo box in dropdown mode.
However, my issue is fixed, thank you very much.
Thank you for contacting us.
You have declared the Updating feature twice and only the second definition is taken into account.
Please declare it only once.
The features declaration should look like this:
.Features(f => { f.Paging() .PageSize(15) .ShowPageSizeDropDown(false); f.Updating().ColumnSettings(cs => { cs.ColumnSetting().ColumnKey("UserName").Required(true).TextEditorOptions(o => o.ValidatorOptions(vo => vo.LengthRange(4))); cs.ColumnSetting().ColumnKey("Delete").ReadOnly(true);
cs.ColumnSetting() .ColumnKey("Gender").EditorType(ColumnEditorType.Combo) .ComboEditorOptions(wrapper => wrapper .Mode(ComboMode.DropDown) .DataSource(Model.Genders) .ValueKey("Key") .TextKey("Value")); }) .EditMode(GridEditMode.Cell) .EnableAddRow(true) .EnableDeleteRow(false) .DeleteRowLabel("Delete"); });
Please let me know if you need additional help.
Seems like the latest version of jquery is breaking a lot of functionality in Infragistics. I just tested it with an example of the Combo box.
Using:
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>
Instead of:
<script src="http://code.jquery.com/jquery-1.9.1.min.js">
This is the issue.
Thanks