This is a migrated thread and some comments may be shown as answers.

AllowSubmitOnEnter does not work with radiobuttons et checkboxes

4 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tommy
Top achievements
Rank 1
Tommy asked on 09 Jul 2012, 05:37 PM
HI, 

i'm trying to make AllowSubmitOnEnter work. I have a RadGrid witch is updated through a templateform. With AllowSubmitOnEnter = true, data is update only if the focus is in a RadTextBox or a RadNumericTextBox. If the focus is in a RadioButton or a CheckBox, the changes are canceled and the first row of my Grid enters in edit mode. 

Is there something to do with this? 

Thanks

Tommy

4 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 12 Jul 2012, 02:00 PM
Hello Tommy,

I have created a sample RadGrid where I implemented the desired behavior. Please check out the attached application and let me know about the result.

Another approach would be to use the initial page load and add any additional elements to the submit controls collection:
function pageLoad() {
    var grid = $find('<%= RadGrid1.ClientID %>');
    grid._submitControls.push({ Name: "input", Type: "checkbox" });
    grid._submitControls.push({ Name: "input", Type: "radio" });
}

All the best,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Tommy
Top achievements
Rank 1
answered on 18 Jul 2012, 07:18 PM
Hi Eyup,

thanks for the reply. Your solution works well in IE and Chrome, but unfortunately, it does not work in Firefox and I don't find why. Any suggestions?
0
Eyup
Telerik team
answered on 19 Jul 2012, 11:43 AM
Hello Tommy,

On my side the provided application works as expected on Firefox too. Could you please instruct me further to reproduce the problematic behavior with Firefox?

Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Tommy
Top achievements
Rank 1
answered on 19 Jul 2012, 12:08 PM
Hi Eyup,

Ok got it working. I had just tried the first solution by using the client event onkeypress. That one does not work in firefox. It does just the same as if I don't put the event. On the other hand, this code :
function pageLoad() {
    var grid = $find('<%= RadGrid1.ClientID %>');
    grid._submitControls.push({ Name: "input", Type: "checkbox" });
    grid._submitControls.push({ Name: "input", Type: "radio" });
}
Works on all browsers.

Thank you

Tom
Tags
Grid
Asked by
Tommy
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Tommy
Top achievements
Rank 1
Share this question
or