Author Topic: Set default value for select list  (Read 4809 times)

suvalkon

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Set default value for select list
« on: September 02, 2014, 11:12:26 am »
Hi

How can you set the default value that has been set up in the grid column so that in EDIT mode if the column has an editor "select" that the default equivalent description is displayed first.

ie the select has a text/value pair, the text is displayed and once selected the value is repopulated in the cell.

eg initially the value may be "PU" which denotes "PICKUP".
I want the "PICKUP" to display in the select list by default as the first one.

Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6210
    • View Profile
Re: Set default value for select list
« Reply #1 on: September 02, 2014, 04:52:00 pm »
Please refer the API

http://paramquery.com/pro/api#option-column-editor

Data for select editor can be written as [ { "PU": "PICKUP" }, ... ]

"PU" can be shown by default in the select list by either making it first entry or made selected option in the editor.init callback