CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 11/13/2006 6:45:08 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 31 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
pnmcosta
Asp.Net User
CompositeDataBoundControlAdapter "Invisible" rows fix11/13/2006 6:45:08 PM

0/0

Hi Guys,

I came up with this problem whilst using a FormView, i had my footertemplate with some buttons that would only be shown on edit or insert, even setting visible to false it was always showing..

So i've noticed the BuildRow method on CompositeDataBoundControlAdapter, wasn't verifying if the row is to be shown or not... So i decided to share this fix for any interested ppl.

Simple fix below, on line 158 of CompositeDataBoundControlAdapter.cs change:

if (bHasContent)

To  

if (bHasContent && row.Visible)

Regards,

Russ Helfand
Asp.Net User
Re: CompositeDataBoundControlAdapter "Invisible" rows fix11/14/2006 5:37:04 AM

0/0

Thanks.  I'll try to include a fix like this in the next rev.
Russ Helfand
Groovybits.com
IDisposable
Asp.Net User
Re: CompositeDataBoundControlAdapter "Invisible" rows fix12/14/2006 11:26:32 PM

0/0

Please DON'T include this fix...it is the wrong approach.  Visible is not the same as Enabled. Things that are not Visible should still be rendered to the client, with a style of display:none.  If you don't emit the elements then it is not possible for client-side code to display the element without a round-trip to the server (or things like hovers working).

So, the right thing to change is for all the places that render rows that could be set to Visible = false to emit the correct style on the tag.


http://musingmarc.blogspot.com
Russ Helfand
Asp.Net User
Re: CompositeDataBoundControlAdapter "Invisible" rows fix12/15/2006 12:19:11 AM

0/0

This fix is already integrated into the RTM 1.0 release of the kit.  I understand what you mean when you say that you want client-side control over the visibility.  However, the Visible attribute for server-side ASP.NET has always (since 1.0 of the framework) strictly meant that the content of that server-side tag would not be rendered to the client.  You and I and others on this forum can discuss how we might the adapters to handle that differently in the future... but let's do that holistically, over all the adapters uniformly, and after we've thought through the ramifications.  Remember, you are proposing to change the essential meaning of Visible from "not rendered by the framework" to rendered by display:none.  Personally, I don't want adapters that put display:none in inline styles on my markup so that means that it has to be in classes that are, hopefully, in external style sheets.  If so, how do we enforce that?  I suppose the adapters could be modified to render this Visible=false content but mark it with a known CSS class like AspNet-FormView-Invisible which the author would have to define as display:none.

Still, that seems like a confusing way to approach this.  If you want to do this then why not simply skip setting Visible=false in the server-side markup/code and use CssClass or other means to simply set display:none on whatever elements you want to... and then reset that to display:block (etc) via whatever JS you want to build up (using home-grown JS or something form ASP.NET AJAX).

Just my 2cents.


Russ Helfand
Groovybits.com
IDisposable
Asp.Net User
Re: CompositeDataBoundControlAdapter "Invisible" rows fix12/15/2006 12:49:20 AM

0/0

I'm a moron... Visible is the guy that prevents rendering... my mistake.


http://musingmarc.blogspot.com
Russ Helfand
Asp.Net User
Re: CompositeDataBoundControlAdapter "Invisible" rows fix12/15/2006 2:40:28 AM

0/0

No worries. Happy holidays.
Russ Helfand
Groovybits.com
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...
CompositeDataBoundControlAdapter "Invisible" rows fix - ASP.NET Forums Re: CompositeDataBoundControlAdapter "Invisible" rows fix ... Re: CompositeDataBoundControlAdapter "Invisible" rows fix ...




Search This Site:










implementing exportmodule

alternate popup calendar control

free text box stripping the urls - a workaround?

where are the developers with new modules ??

catalook question - possible to use as a job board?

newbie - how to install modules

personalized links and weather module

who's on line?

anybody have experience with non profit using dnn

install error

new event calendar module available for download

gallery install error

edit command in datagrid

how to create child portal after register

outlook contacts

multiple view controls in 1 module

sqldataprovider runtime error (c#)

ngallery

content based on url parameter

module loading error

database script spanish encoding

solpart menu token settings

dnn3 - simple number guessing game

action.add display location

how to create a sitemap(menu) dynamically?

mobile access

the module list on dotnetnuke.com could be much better.

module update: smart-thinker events 1.0.4 released: dnn 4.x compatible

html storing

how to add extra columns to host 〉portals

  Privacy | Contact Us
All Times Are GMT