Hi Friends,
I have a table like below
<div class="datatable-tools">
<table class="table" id="tblInfo">
<thead style="font-size:14px;">
<tr>
<th>Name</th>
<th>Years</th>
<th>Months</th>
<th>Number</th>
<th>Number2</th>
<th>Number3</th>
<th>Gender</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
In that table Gender is a list value .. is there a way i can show the selected value in the table row along with other data using jquery
Gender is hardcoded in html's
<select class="form-control" tabindex="23" id="ddlSex">
<option value="0">Select</option>
<option value="M">Male</option>
<option value="F">Female</option>
</select>
when i tried to do it.. it is showing the value of that selected one in the table
like Gender = M instead of Male
assigning the selected value like this Sex:
$("ddlSex").val()
,
passing all the details to a table
$.each(Details, function (i, item) {
var memberModel = [
item.Name,
item.Years,
item.Months,
item.Gender,
item.Number,
item.Number2,
item.Number3,
];
DetailsArray.push(memberModel);
});
var thisTable = $('#member').dataTable();
thisTable.fnClearTable();
thisTable.fnAddData(DetailsArray);
thisTable.bDeferRender = true;
Can anyone help here plz