CodeVerge.Net Beta


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




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: Date Entered: 12/29/2006 8:06:04 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 68 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
"Copyrigh2003"
NewsGroup User
DetailsView unable to set input width in edit mode12/29/2006 8:06:04 PM

0

I have a DetailsView that I converted from a FormView. Looks great and a lot less code but I have't been able to set the width of a Textbox.  Only part of the text is shown, I'd like to make more visible.  My templated dropdown is okay because I have set the width. 

 I've tried the

BoundField ItemWidth, the DetailsView's Row-Style-Width, the Basic CSS's

.PrettyDetailsView span.AspNet-DetailsView-Value.  Still no luck.

 

What am I missing? Do I need to use templates for every field that I need to widen?

Thanks

"Russ Helfand"
NewsGroup User
Re: DetailsView unable to set input width in edit mode12/30/2006 7:17:21 PM

0

You mentioned having tried several things.  I would encourage you to focus exclusively on the last one, wherein you tried to modify a CSS rule having to do with AspNet-DetailsView-Value.  That's a good start... but you need to refine you approach a little.

If I understand correctly, you want to directly control the width of the textbox that is showing the value some field you bound to.  Presumably, this is when you are in the "edit" mode for the DetailsView.  If you look at the HTML source code for the page I think you'll find that there is a <span> whose class is AspNet-DetailsView-Value and inside of it there is an <input> tag that is the textbox whose width you said you want to adjust.  Right?

If so then the CSS rule's selector (the thing that identifies what part of the DOM the rule applies to) must zero in on the <input> tag itself.  If your <asp:DetailsView> has a CssSelectorClass value of PrettyDetailsView then the CSS rule for the textbox would be something like:

.PrettyDetailsView span.AspNet-DetailsView-Value input
{
    width: 50em;
}

Of course the exact value for the width would be whatever you think is right, 50em is just an placeholder value.

Would you give this a try and let me know what happens? There's lots of cool info on most of web search engines about more of the ways that you can tailor your CSS rules' selectors (the part before the first brace) so the rule only impacts the elements of your page that you are interested in.  Try searching around for: CSS selector syntax

Good luck and happy new year!


Russ Helfand
Groovybits.com
"Copyrigh2003"
NewsGroup User
Re: DetailsView unable to set input width in edit mode12/31/2006 1:30:38 AM

0

That did it, thank you.  I'm still stumbling around CSS.  I thought that I had tried exactly that although my last stab had

.PrettyDetailsView span.AspNet-DetailsView-Value.input not

.PrettyDetailsView span.AspNet-DetailsView-Value input

Unfortunately this has another affect, my checkbox is now centered (appears to be centered) rather than left aligned as before (in both edit and non-edit mode). Oh, I thought this would be easy to fix, but all alignment keywords in the CSS or ASP:CheckBox failed - after all the text fields weren't center.  Well some of the last hairs off the top of my head are now gone, and if I force that item by ID to have width of 1em, it is now left aligned aligned. Seems draconian but it works! Thanks for the Google path ( http://www.w3.org/TR/REC-CSS2/selector.html ) inspired me to try to mug it by ID.

input#ctl00_ContentPlaceHolder1_GroupView_VolunteerCheckBox

{

width: 1em;

}

Thanks again for you timely help.

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:













users and groups

asp.net newbie needs to understand how impersonation works (with ad)

script injection

restricting direct access to url

irregular behavior: access is denied to images and css files

membership creates the same user twice

forget password encryption and descryption

please help me with this security issue

need help using the login control and saving additional info on a different database.

question on website administration tool and the aspnetdb tables

accessing custom membership custom functions

provideruserkey question

logincontrol layouttemplate not working

dybamic connection string

vb.net and siteminder

import bulk users from excel to usermanagement database

security on a shared hosting webserver?

active directory

problem with password recovery

forcing login to always redirect to a single page?

request for permission of type..

how to use roles in .net 3.5?

forms authentication/authorization

can it all be done with web.config

protect a directory with forms authentication

loginview and rolegroup.roles with multiple custom role providers

compairing passwordquestion answers

asp.net account lockout

use login control with a sql server db

access to remote file (ex \\pc\folder\image.png)

xml firewall

have a publicly viewable home page in same folder as login restricted pages?

general windows auth + intranet security confusion

dcom, web services and workgroup to domain authentication

using mysql with members, roles, and profiles

redirect timed out session

custom identity stops working when moving to server 2003

finding out if a user is online

error in rolemanager

sqlexpress database file auto-creation error:

my.user.isinrole - windows 2000 only works when launched from vwd

customized sign up

help with createuserwizard, please!

passwordrecovery by entering an email address

health monitoring and logging

i want to redirect unauthorized users to a 404 page, how?

persistent vs temporary cookie

security problem - system.unauthorizedaccessexception: access is denied

protect folder using config file

how to access website administration tool for a production web site?

   
  Privacy | Contact Us
All Times Are GMT