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

ASP required field validator not working with rad combobox in edit itemplate of radgrid

6 Answers 359 Views
Grid
This is a migrated thread and some comments may be shown as answers.
S
Top achievements
Rank 1
S asked on 29 Jan 2013, 06:48 PM
ASPX CODE:

 <telerik:GridTemplateColumn UniqueName="OS_VERSION" HeaderText="OS Version" DataField="OS_VERSION"
                    SortExpression="Device_Control" ItemStyle-Wrap="false" FilterControlWidth="30px"
                    Visible="true" AutoPostBackOnFilter="true">
                    <EditItemTemplate>
                        <telerik:RadComboBox runat="server" ID="OSVersionRadCombobox_Edit" MarkFirstMatch="true"
                            AllowCustomText="false" EnableTextSelection="true" Height="140px" Width="100px"
                            Filter="Contains" DropDownWidth="100px" EmptyMessage="Select">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="OSVersionRadComboboxFieldValidator" runat="server"
                            InitialValue="Select" ControlToValidate="OSVersionRadCombobox_Edit" ErrorMessage="Please select a OS Version"
                            Display="Dynamic" Font-Size="X-Small" Font-Bold="true" Font-Italic="true" ForeColor="Maroon">
                        </asp:RequiredFieldValidator>
                        <br />
                        <asp:Label ID="NoRecrdFndlbl_edit" ForeColor="Brown" Font-Bold="true" Font-Italic="true"
                            Font-Size="X-Small" runat="server" Visible="false" Text="No OS Versions found"></asp:Label>
                    </EditItemTemplate>
......................................



Any body suggest please

6 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 30 Jan 2013, 05:28 AM
Hello,

Please remove below property from your code snippet.
InitialValue="Select"



Thanks,
Jayesh Goyani
0
Durga
Top achievements
Rank 1
answered on 04 Mar 2014, 06:08 PM
Hello jayesh,

I have the same kind of issue with my rad grid and batch edit--Required field is not firing.

Can you please suggest how to handle it.

Thanks in advance.




<telerik:GridTemplateColumn HeaderText="Time" DataField="Time" UniqueName="Time" HeaderStyle-Width="15%">

<ItemTemplate>

<%#Eval("Time") %>

</ItemTemplate>

<EditItemTemplate >

<telerik:RadComboBox runat="server" ID="rcbTime" AllowCustomText="true" Width="120" EnableTextSelection="true"   MarkFirstMatch="true" > </telerik:RadComboBox>

<asp:RequiredFieldValidator runat="server" ID="rfvTxttime" ControlToValidate="rcbTime" ErrorMessage="Required" ForeColor="red" Display="Dynamic" ></asp:RequiredFieldValidator>

</EditItemTemplate>

</telerik:GridTemplateColumn>

0
Angel Petrov
Telerik team
answered on 07 Mar 2014, 11:54 AM
Hi Durga,

Using the column declaration I tried reproducing the problem in an isolated sample but to no avail. Could you please examine the attachment and tell us what differs in your case? Additionally please elaborate more on the following:
  1. The controls version used in the application
  2. The version of the targeted framework.
  3. Browser and browser version used for testing

Regards,
Angel Petrov
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

0
Durga
Top achievements
Rank 1
answered on 07 Mar 2014, 06:44 PM
Hello Angel,

Thanks  for the response.
  1. The controls version used in the application --Version 2013.3.1114.45
  2. The version of the targeted framework. -- IE 10
  3. Browser and browser version used for testing  -- .Net Frame work 4.5

Rad grid Batch Edit(Edit type =Cell)  -->Rad combo (allow custom text =true ), for this case the required filed validation is not firing if I make it as blank.

I didn't see any attachment in the previous post.

Please refer the screen shot, got when I tried to edit the field .

--Thanks

0
Durga
Top achievements
Rank 1
answered on 07 Mar 2014, 06:51 PM
Hello Angel,

Thanks for the response.
  1. The controls version used in the application -- Version 2013.3.1114.45
  2. The version of the targeted framework. -- .Net Frame work 4.5
  3. Browser and browser version used for testing  -- IE 10

Rad grid Batch edit (Edit type=Cell) -->Rad combo box (Allow custom text=true) , for this if I make the text as blank the required field validator is not firing.

I don't see any attachment in the previous post.

Please refer the screen shot.

--Thanks

 

0
Angel Petrov
Telerik team
answered on 12 Mar 2014, 12:58 PM
Hi Durga,

Since the project is being ran in 4.5 the problem may be related to the unobtrusive validation. Please add the following in your web.config and test whether the problem is resolved.
</system.web>
    <appSettings>
      <add key="ValidationSettings:UnobtrusiveValidationMode" value="None"></add>
    </appSettings>
  <system.web>

As for the attachment it seems that it is not appearing when viewing the post from out of our system. We are currently researching this problem and hope that will resolve it sometime soon. Please accept our apologies for any inconvenience caused.

Regards,
Angel Petrov
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
Tags
Grid
Asked by
S
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Durga
Top achievements
Rank 1
Angel Petrov
Telerik team
Share this question
or