I want to access jsongrid value in radio button (gender field) without applying html.I tried simple javascript function which is working fine in UI but the value coming through html input but I want value come from jsongrid.Plz help me out..
this is JavaScript code
<script type="text/javascript">
$j.ajax({
url:"UserGender",
type: "GET",
data: datasourses,
dataType: "json",
success: function (data){
$.each(data, function(i, selectedItem) {
alert("paramValue: " + selectedItem.paramValue + ", paramCode: " +
data.selectedItem.paramCode);
});
}
});
</script>
This is html
<input type="radio" name="Female" >
<input type="radio" name="Male" >
Json code
{
"jsonWrapperforGrid": {
"page": "1",
"total": "2",
"rows": [
{
"tenantId": 0,
"paramType": "UserGender",
"paramCode": "F",
"langCode": "en",
"paramValue": "Female"
},
{
"tenantId": 0,
"paramType": "UserGender",
"paramCode": "M",
"langCode": "en",
"paramValue": "Male",
"paramBlob": ""
}
]
}
}
Thanks in advance
1 Answer