I Want to use validatorcallout extendor with Infragistic webdataedit controls
can any one tell me how i can use it , because i tryed it but error massage popup at wrong place
Hi,
I looked at implementation of AjaxControlToolkit.ValidatorCalloutBehavior and found that it relies on "target" html element which should be <input> and which id (elt.controltovalidate) is assumed to be equal to the ClientID of control on server.
That means that target can be only a simple control like asp:TextBox which renders its single <input> element with expected id. In order to support built-in dot-net validators, the WebTextEdit uses hidden element with id equal to ClientID. The id of actual visible <input> is different and it may depend on other properties (like enabled/disabled spin buttons).
Unfortunately WebTextEdit and any its extension is not compatible with ValidatorCalloutBehavior.
Hi
thanks for reply , but i show in one site one guys taoking about hardcoding some thing in source file and it would be work , can you explain me how and where
i aprriciate your help
this is site path
http://forums.archive.infragistics.com/readmessage?id=%3C336a409b$2d96b370$519d1c@news.infragistics.com%3E&group=infragistics.products.netadvantage.aspnet.webdatainputce code change
Sure you may customize toolkit. To include validation for WebTextEdit you may add a statement to _ensureCallout located in ValidatorCalloutBehavior.js:
Old code:
var elementToValidate = this._elementToValidate = $get(elt.controltovalidate);
New code:
var elementToValidate = $get(elt.controltovalidate);if(elementToValidate && elementToValidate.type == 'hidden'){ var elem = $get('igtxt' + elt.controltovalidate); if(elem) elementToValidate = elem;}this._elementToValidate = elementToValidate;
Thanks for help but i still not get proper popup massage
it still littel far from connected control and not yellow background too and the textbox become readonly untill i close that popup
for all webTextEdit control it popup same place instead off top left
i don't know how to fix that
To test codes which I sent you, I used \AjaxToolKit\SampleWebSite\ValidatorCallout\ValidatorCallout.aspx where aps:TextBox with ID=NameTextBox I replaced by WebTextEdit with same id. It worked exactly the same way as for TextBox, including abiltiy to edit while pop-up. If your WebTextEdits have spin or custom buttons and you want to move extender to internal <input> rather than for outer <table>, then you may modify codes by validation for ID+'_t' element. Though it should be optional.
When you test I would recommend you to ensure that your codes are called and work correctly. For example, temporary insert
debugger;
or
alert('inside callout');
line anywhere within your modified codes. If debugger is never hit or alert does not appear, then it probably means that at run time different toolkit-dll is used. Maybe on your machine it is in GAC, locked, cached by VisualStudio or similar problem.
Thanks for all these help , but it still not working ,can you tell me how to unlock GAC ?
i try to see ajax assembly in GAC in c:/window/assably
but i can't find it , so let me know wha i should do ,i tryed to add assembly in GAC using gacuti /i command in command propt of computer and VS . i don't able to add that
this is the way i tryed to use that
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Button ID="Button1" runat="server" Text="Button" />
<igtxt:WebTextEdit ID="WebTextEdit1" runat="server">
</igtxt:WebTextEdit>
<igtxt:WebNumericEdit ID="WebNumericEdit1" runat="server">
</igtxt:WebNumericEdit>
ErrorMessage="RequiredFieldValidator" ControlToValidate ="WebTextEdit1">*</asp:RequiredFieldValidator>
<cc1:ValidatorCalloutExtender
ID="ValidatorCalloutExtender1" runat="server" TargetControlID ="RequiredFieldValidator1">
</cc1:ValidatorCalloutExtender>
</div>
In my one website it was middle fo left side and no yellow beckground , after that i created new site for testing in that site it was topleft side and also don't show me that alert massage
var elementToValidate = $get(elt.controltovalidate);if(elementToValidate && elementToValidate.type == 'hidden'){ var elem = $get(elt.controltovalidate + '_t'); if(!elem) elem = $get('igtxt' + elt.controltovalidate); if(elem) elementToValidate = elem; alert(" Now Working");}this._elementToValidate = elementToValidate;
i aprriciate all help
I tryed that one which one u tryed \AjaxToolKit\SampleWebSite\ValidatorCallout\ValidatorCallout.aspx , that ajax version is 1. .... , it show me error that that version could't find in computer , so i changed the referance to ner version and change that textbox with webtextbox then run but not working
Hi Siya,
If dll is located in GAC and you can not delete it, then it does not sound good. I can give you only actions which I would do.
1. Close all instances of VisualStudio and related software.2. Stop IIS3. Delete all files from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\*.* (or similar)4. Delete all files from C:\Documents and Settings\[viktors]\Local Settings\Application Data\Microsoft\WebsiteCache\*.* (or similar)5. Delete AjaxControlToolkit.dll from GAC.
You also may find all instanced of AjaxControlToolkit.dll on your machine and delete them (or know where they are).
If that will not work, then try to reboot and repeat steps again. If you installed only run-time toolkit and you do not have on your hard drive a copy of dll which is used by GAC, then, I think, you should call Microsoft for directions to remove it (maybe uninstall toolkit).
I prefer to keep all 3rd party dlls (inlcuding dot-net products) only in a local to project bin directory. I have only debug version of toolkit which was built from source files.
I found the solution. It looks like with Infragistics 2012, the control has ":v:" after it. So I just updated Client\MicrosoftAjax.Extended\ValidatorCallout\ValidatorCalloutBehavior.pre.js with the following change:
var elementToValidate = this._elementToValidate = $get(elt.controltovalidate.replace(":v:", ""));
Now the ValidatorCalloutExtender appears in the proper position.
I tried that too but it didn't work. I downloaded AjaxControlToolkit.Source.zip file from:
http://ajaxcontroltoolkit.codeplex.com/releases/view/65800
Do you what else I need to change?
Thanks,
Trent
Hi Trent,
You probably refer to difference between old WebMaskEdit and new WebMaskEditor controls. Those are completely different controls, though, they use similar functionality.
I guess in your codes you should remove prefix "igtxt" and use something like
elem = $get(elt.controltovalidate);
It looks like in Infragistics 2012, the hidden fields does not begin with "igtx" anymore. So now the message appears in the upper left corner again.
Infragistics 2009 source code for masked editor field: (working properly)
I found the solution at http://robrich.org/archive/2008/03/27/validator-callout-doesnt-display-on-second-control-after-fixing-first.aspx.