Hi I have two WebDataGrid controls on my page, and each one has a required field validator
If I click on required field on an empty row on grid1, and then click a required field on an empty row in grid2 it causes an infinite loop.
It looks like what it is doing is that the grid1 validator fires after the grid2 selection has been made so it tries to pull the focus back to the required field. By pulling the focus off of grid2 it then fires the grid two required field validator.
So the validators fight each other to try to place focus on their respective required fields.
Any idea how to get around this scenario?
Hello,
Thank you for contacting us.
I have created a sample in order to invoke the issue, although I couldn't. Could you please have a look at the sample and let me know what I am missing from your scenario.
It will be highly appreciated if you could make the necessary changes in order to reproduce the issue.
Looking forward for your reply.
I'm not able to run the sample in my environment but I have simplified the code I'm using as much as possible and still have the problem.
Here is the code I am using. So clicking on and off of the required fields causes the loop to start
<ig:WebDataGrid ID="gridPhone" runat="server"
AutoGenerateColumns="False"
EnableAjax="false"
Width="100%"
Height="135px"
DataSourceID="odsPhone" DataKeyFields="Id"
EnableDataViewState="True" >
<Columns>
<ig:BoundDataField DataFieldName="ContactTypeCd" Key="ContactTypeCd" Width="20%">
<Header Text="Type" />
</ig:BoundDataField>
</Columns>
<EditorProviders>
<ig:TextEditorProvider ID="gridPhone_TextProvider1" EditorControl-MaxLength="40">
<EditorControl ID="EditorControl1" MaxLength="40" runat="server" CausesValidation="True"></EditorControl>
</ig:TextEditorProvider>
</EditorProviders>
<Behaviors>
<ig:EditingCore BatchUpdating="true">
<ig:RowAdding>
<ColumnSettings>
<ig:RowAddingColumnSetting ColumnKey="ContactTypeCd" EditorID="gridPhone_DropDownProvider1" ValidatorID="contactInfoTypeValidator" />
</ColumnSettings>
<EditModeActions MouseClick="Single" EnableOnActive="False" />
</ig:RowAdding>
</Behaviors>
</ig:EditingCore>
</ig:WebDataGrid>
<asp:RequiredFieldValidator
ID="contactInfoTypeValidator"
Text="required"
ControlToValidate="gridPhone"
runat="server"
/>
<br />
<ig:WebDataGrid ID="gridSocial" runat="server"
Height="119px"
DataSourceID="odsSocialMedia" DataKeyFields="Id"
<ig:BoundDataField DataFieldName="SocialNetworkCd" Key="SocialNetworkCd" Width="20%">
<ig:TextEditorProvider ID="gridSocial_TextProvider" EditorControl-MaxLength="40">
<EditorControl ID="EditorControl2" MaxLength="40" runat="server" CausesValidation="True"></EditorControl>
<ig:EditingCore>
<ig:RowAddingColumnSetting ColumnKey="SocialNetworkCd" ValidatorID="socialNetworkValidator" EditorID="gridSocial_DropDownProvider" />
ID="socialNetworkValidator"
ControlToValidate="gridSocial"
ErrorMessage="required"
To reproduce the problem with the above sample I had to click back and forth between the two fields so it required two clicks.
Note that I am using infragistics assembly:
Register Assembly="Infragistics4.Web.v13.1, Version=13.1.20131.2157
Thank you for clarifying this.
I have changed my sample to use your version (2157) and similar issue appeared, although it is fixed in the latest service release for 13.1 (2331), so my suggestion is to update your product to the latest version for 13.1 available and let me know about the results.
Every SR contains behavior fixes that can improve the performance of your website/project.
Looking forward to hearing from you.
I updated my assembly to the latest version but the problem persists. I click on the bottom row, then click on the top row twice to reproduce the problem.
<add assembly="Infragistics4.Web.v13.1, Version=13.1.20131.2331
This is strange, did you tested my sample? Could you please confirm that the issue is reproducible with my sample also, if not, it would be highly appreciated if you try to isolate the issue there and send it back to me in order to investigate it further for you.
Hello, did you have the chance to try the suggestion from my last reply?
Hi Zdravka, I currently don't have the time to set up the sample you provided and put more work into this one. Since this problem is not a showstopper for our project I will be placing it on the backburner to revisit down the road.
Once you have a look at the provided sample by me, we will be able to determine in which version exactly this validator issue appears, because as I have shared with you, with the latest service release the issue is not reproducible.