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

radiobuttonlist setfocusonerror not working

3 Answers 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 07 Jun 2011, 02:17 PM
I have a template column in a radgrid, with a radiobuttonlist and I put on a validator.  Problem is the setfocusonError does not set focus on the validator.  My grid has about 40 records so sthey are at bottom clicking on the submit button thinking its not working when in fact they have a validation error.  How can i fix this so that it focuses on the validation error.

<telerik:GridTemplateColumn HeaderText="GO \ NOGO \ Not Fixable" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="210px">
                                                                        <ItemTemplate>
                                                                            <asp:RadioButtonList ID="rblDental" runat="server" RepeatDirection="Horizontal" TextAlign="Right" Font-Size="Smaller" RepeatLayout="Flow">
                                                                                <asp:ListItem Value="0" Text="GO&nbsp;&nbsp;&nbsp;" />
                                                                                <asp:ListItem Value="1" Text="NO\GO&nbsp;&nbsp;&nbsp;" />
                                                                                <asp:ListItem Value="2" Text="N\F" />
                                                                            </asp:RadioButtonList><br />
                                                                            <asp:RequiredFieldValidator ID="valDRadio" runat="server" ControlToValidate="rblDental" ErrorMessage="Not Answered" ForeColor="Red" ValidationGroup="Dental" SetFocusOnError="true" />
                                                                        </ItemTemplate>
                                                                    </telerik:GridTemplateColumn>

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Jun 2011, 02:25 PM
Hello Kevin,

As far as i know ASP Standard Validators are officially not supported with Ajax. Try to add the Validators into the RadAjaxManager settings so that validators and the corresponding controls should get updated together.

Thanks,
Princy.
0
Kevin
Top achievements
Rank 1
answered on 07 Jun 2011, 02:41 PM
Hi,

Still new to these radgrid controls and learning how to use them all together.  i guess I am not following what you would liek me to do.
0
Iana Tsolova
Telerik team
answered on 10 Jun 2011, 08:42 AM
Hi Kevin,

How does it work if you put the RadioButtonList and the validator out the grid and without ajax, for instance on an empty page?

Kind regards,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Kevin
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or