you can see the page under development at http://job1data.com:8098/admin.aspx

at first i had no validationGroup and the validations for add row fields would always fire, so that was no good. so i'm trying to put them in a validation group. you can see from the sample code i put the vg in field textbox, the field's validation controls, and the add button, now when the add button is clicked i get no validation at all.
so i get both extremes but not what is needed. this seemed pretty straight forward, i'm not seeing what is missing or wrong, any suggestions?

example asp code for one of the add row data fields, it would the same general format for all other fields:

<FooterTemplate>
          <asp:textbox ID="newOrientationTime" runat="server" Width="50" ValidationGroup="newODate"/>
          <asp:RequiredFieldValidator id="newOrientationTimeReq"
            runat="server" Display="none" ControlToValidate="newOrientationTime"
            ErrorMessage="an orientation start time is required" ValidationGroup="newODate">
          </asp:RequiredFieldValidator>
  </FooterTemplate>

and the asp for the add button

<FooterTemplate>
          <asp:Button CommandName="Insert" Text="Add" CausesValidation="true"
           ID="btnAdd" Runat="server" ValidationGroup="newODate"/>
 </FooterTemplate>
Member Avatar for Bei_Mu_tian

this has to be taken out.

Display="none"

hope this fixes it for ya!

you can see the page under development at http://job1data.com:8098/admin.aspx

at first i had no validationGroup and the validations for add row fields would always fire, so that was no good. so i'm trying to put them in a validation group. you can see from the sample code i put the vg in field textbox, the field's validation controls, and the add button, now when the add button is clicked i get no validation at all.
so i get both extremes but not what is needed. this seemed pretty straight forward, i'm not seeing what is missing or wrong, any suggestions?

example asp code for one of the add row data fields, it would the same general format for all other fields:

<FooterTemplate>
          <asp:textbox ID="newOrientationTime" runat="server" Width="50" ValidationGroup="newODate"/>
          <asp:RequiredFieldValidator id="newOrientationTimeReq"
            runat="server" Display="none" ControlToValidate="newOrientationTime"
            ErrorMessage="an orientation start time is required" ValidationGroup="newODate">
          </asp:RequiredFieldValidator>
  </FooterTemplate>

and the asp for the add button

<FooterTemplate>
          <asp:Button CommandName="Insert" Text="Add" CausesValidation="true"
           ID="btnAdd" Runat="server" ValidationGroup="newODate"/>
 </FooterTemplate>

Hello bbxrider

Are you using asp.net 2 with ajax and validations inside update panel? , then this a known issue.

However your code seems to be Ok but do paste your complete .aspx code here

this has to be taken out.

Display="none"

hope this fixes it for ya!

thanks, that did look an obvious simple fix, i took out all display=none and still have same problem, ie no client side validation

I seem to be making progress but new problems. I recoded the footer fields for date and time and they are now working as expected. so then I've attempted to add the remaining fields one at a time so I can see if there is problem somehow with any one field. for both the count and location room, the validation does not occur, the code for those 2 looks the same to me as the code for the date and time which work ok? this is starting to drive me crazy.
sample for time field which works

<FooterTemplate>
          <asp:textbox ID="newOrientationTime" runat="server" Width="50" />
          <asp:RequiredFieldValidator id="newOrientationTimeReq" Display="Dynamic"
            runat="server" ControlToValidate="newOrientationTime" ValidationGroup="newOdate"
            ErrorMessage="an orientation start time is required" >
          </asp:RequiredFieldValidator>
      </FooterTemplate>

code for count and room

<FooterTemplate>
          <asp:textbox ID="newTargetAttendeeCountTextBox" runat="server" Width="50" />
          <asp:RequiredFieldValidator id="newTargetAttendeeCountReq" 
            runat="server" Display="Dynamic" ControlToValidate="newTargetAttendeeCountTextBox"
            ErrorMessage="target attendee count is required" ValidationGroup="newODate">
          </asp:RequiredFieldValidator>

      <FooterTemplate>
          <asp:textbox ID="newLocationRoomTextBox" runat="server" Width="60" />
          <asp:RequiredFieldValidator id="newLocationRoomReq" 
            runat="server" Display="Dynamic" ControlToValidate="newLocationRoomTextBox"
            ErrorMessage="location room is required" ValidationGroup="newODate">
          </asp:RequiredFieldValidator>
      </FooterTemplate>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.