George,
This indeed is a bug. I reported it to Microsoft a few months ago and worked
with them to get it into their bug database. They will be considering it for
ASP.NET 2.0. (Read: its not guaranteed to get fixed.)
The datagrid has several bugs like this. Each of them calls the OnPreRender
method of the control but not the Render method when the containing area is
invisible. This causes problems when client-side code is output. That
happens in OnPreRender in validators and many third party controls. The
javascript is expecting to run on HTML that was output by Render. The HTML
isn't there. There are JavaScript errors.
You will find this bug:
- In the header when ShowHeader is false
- In the footer when ShowFooter is false
- In a column whose Column.Visible property is false.
--- Peter Blum
www.PeterBlum.com
Email:
PL****@PeterBlum.com
"George Birbilis" <bi******@kagi.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Disable the validation controls whenever your user control is hidden
(Enabled = false).
indeed that's the trick, but it's very annoying unfortunately, in fact I
consider that behaviour a bug
an invisible validator should be a disabled validator (since if you just
wanted it to not show text but show it at the validation summary, you'd
set text=" " [a space char] and errormessage="something")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <bi******@kagi.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://www.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
.................................................. ......................