FancyGrid icon indicating copy to clipboard operation
FancyGrid copied to clipboard

displayKey for grid combo widget

Open kkange opened this issue 7 years ago • 2 comments


document.addEventListener("DOMContentLoaded", function() {
var comboData = [{
    "value": "1",
    "displayname": "Alabama"
  },{
    "value": "2",
    "displayname": "Alaska"
  }];
    
var data = [{
  id: 1,
  name: 'Peter',
  country: "1"
}];
    
var grid = new FancyGrid({
    renderTo: 'grid',
    data: data,
    columns: [{
    	index: 'name',
      title: 'Name',
    },{
      index: 'country',
      title: 'Country',
      type: 'combo',
      displayKey: 'displayname',
      valueKey: 'value',
      data: comboData,
    }]
  });
});

hi

displayname is not visible

What should I do?

https://jsfiddle.net/kanggee/Lob972gm/

kkange avatar Aug 14 '18 07:08 kkange

Sorely it is one of old issue on which we do not have time. valueKey and displayKey works well for form combo but for grid combo it has problems. It conflicts with filtering, editing and sorting that's why we disabled it.

valueKey and displayKey should be similiar, if they are not than it auto set to one value.

We constantly get report about this bug. We are sorry for this bug. Our main priority on next months to redo Angular and Vue wrappers. Maybe after it we could find time to fix it.

MikeTatsky avatar Aug 14 '18 08:08 MikeTatsky

thank You do not have to be sorry

kkange avatar Aug 14 '18 08:08 kkange