ryansuitposungkono / openjs-grid

Automatically exported from code.google.com/p/openjs-grid
0 stars 0 forks source link

a col with select #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Exists any way to put a select combo without a database data?

Original issue reported on code.google.com by rodrigor...@gmail.com on 24 Sep 2011 at 11:18

GoogleCodeExporter commented 9 years ago
you can form the select in PHP but it doesn't have to use makeSelect(). You can 
just create your would just switch to detect the col and the form an array like 
so

remember the key of the array is the value attribute of the option and the 
value of the array is the display of the option.

} else if(isset($_POST['select'])) {
   switch($_POST['col']) {
        case "whateverCol":
            $array = array(
             "0"=>"Dollar Off",
             "1"=>"Percent Off"
            );
            echo json_encode($array);
             break;
    }
}

Original comment by Seancla...@gmail.com on 11 Oct 2011 at 3:10