The example without using editing template doesn't work, as you can see in the next image.
Both are selected, however only one must be selected.
Please, could you provide me another sample without using editing template?
Thanks again.
Regards, Luis Carlos.
Hi again.
Finally, the "ejRadioButton" component works well, however when I click on the save button and stop it into "actionBegin" function (as you can see in the next image), I realise there is only two attributes in the variable "args.data" (OrderID: 1223, radButton: "true"). How can I know which one is selected? It should show four attributes (OrderID: 1223, Verified: "false", RadioButton2: "true", RadioButton3: "false") in order to let me know the value of each cell.
Please, let me know, as soon as possible, how can I fix it. Thanks in advance.
Regards, Luis Carlos.
actionBegin: function (args) {
if (args.requestType == "save") {
args.data.Verified = $("#GridVerified").ejRadioButton("model.checked") ? "true" : "false";
args.data.RadioButton2 = $("#GridRadioButton2").ejRadioButton("model.checked") ? "true" : "false";
args.data.RadioButton3 = $("#GridRadioButton3").ejRadioButton("model.checked") ? "true" : "false";
}
} |
Hi again.
Finally, I could get the values of each radiobutton with your support, however, In the event "ActionComplete" the requestType is "cancel" and I was expecting "save".
Why is the value "cancel"? It should be "save" because I click on the button "save".
I will be awaiting for your reply, thanks in advance.
Regards, Luis Carlos.
Hi Luis,
We have analyzed your query and we are able to reproduce the reported issue. The issue is because of having the same name attribute for the radio button elements. Having same name attribute for multiple columns affects the normal behavior of editing. Hence the row is not considered as edited, and its prevented from saved. Hence the requestType is returned as “cancel”.
You can avoid this issue by setting the _isEditChangesApplied as true. Also we suggest you to update the other columns based on the radio button.
actionBegin: function (args) { if (args.requestType == "save") { this._isEditChangesApplied = true; var obj = $("#GridVerified").ejRadioButton("instance"); args.data.Verified = obj.model.checked; var obj = $("#GridRadioButton2").ejRadioButton("instance"); args.data.RadioButton2 = obj.model.checked; var obj = $("#GridRadioButton3").ejRadioButton("instance"); args.data.RadioButton3 = obj.model.checked; } }, |
We have also prepared a JSPlayground sample based on your requirement, please refer the link below,
Link : http://jsplayground.syncfusion.com/x4lrdljp
Regards,
Renjith Singh Rajendran.