I have a column with text fields in my ui grid. I need the last two cells of the column to contain a dropbox. I am not sure how to do this the best way. I am using bootstrap and angularjs for the grid and data within the grid.
Here is where I declare the grid within the html file:
<div class="modal-body">
<div id="gridTest" ui-grid="gridOptions" class="grid"></div>
</div>
Here is where I setup the data for the columns and the textfields for the column I am talking about:
$scope.gridOptions = {
showGridFooter: true,
enableHorizontalScrollbar: 0,
showColumnFooter: false,
enableFiltering: false,
enableColumnMenus: false,
enableGridMenu: false,
columnDefs: [
{ field: 'empty', width: '34%', displayName: ''},
{ field: 'modified', width: '34%', displayName: 'Modified', cellTemplate: '<input class="text-test" type="text">'},
{ field: 'original', width: '34%', displayName: 'Originals', cellTemplate: '<div style="text-align:center">{{COL_FIELD CUSTOM_FILTERS}}</div>'},
],
data: [
{
"empty":"Number of Employees(Daily)",
"modified": "",
"original":"20",
},
{
"empty":"Customer Restroom Visits(Daily)",
"modified":"",
"original":"5",
},
{
"empty":"Days Open per Week",
"modified":"",
"original":"5",
},
{
"empty":"Number of Restrooms",
"modified":"",
"original":"2",
},
{
"empty":"Number of Stalls",
"modified":"",
"original":"2",
},
{
"empty":"Number of Urinals",
"modified":"",
"original":"2",
},
{
"empty":"Delivery Frequency",
"modified":"",
"original":"Weekly Deliveries",
},
{
"empty":"Billing Frequency",
"modified":"",
"original":"Monthly",
}
],
onRegisterApi: function(gridApi) {
$scope.gridApi = gridApi;
}
};
Is there a way I can set each cell in the columns as its own field? and how would I add in a dropdown menu for the 2 cells within the column?
I am new to this so any additional information please let me know, thanks!