Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1355
IgCombo CustomValue option - sending newly added custom value to Controller
posted

Hi,

I am using IgniteUI 15.2 igcombo Jquery controls and my sample code is below. I use Id column as ValueKey and Name column as TextKey. I have also enabled AllowCustomValue = true to allow user defined value and pass to MVC controller (bind to Model)

$('#testList').igCombo({
mode: "editable",
dataSource: _testList,
selectedItems: [ { value: "@Model.SelectedId" } ],
initialSelectedItems: [ { value: "@Model.SelectedId" } ],
textKey: "TestName",
valueKey: "TestId",
allowCustomValue: true,
width: "375px",
});

Is there a way to pass the custom value (There is no id since user added this entry) that was added and selected back to MVC controller in my scenario where i have id column as a valuekey?

If yes, please attach some sample project.

Thanks,

Valliappan

Parents
  • 1355
    posted

    Just to give you some context. As of now we are using both textKey and ValueKey as "Name" column but i am running into the below issue

    igcombo  can't initialize the selectedItem  on load if my data has a double quotes/apostrophe/any other special characters

    Ex: "15" monitor" or "Laptop's Name"  so i was thinking of using valueKey as "Id" column and hence my 1st post 

    In both options, i have some roadblocks. Please recommend.

    Thanks,

    Valliappan

Reply Children
No Data