Grid edit item : what gives some bound columns a back colour ?

B

Bazza Formez

Hi there,

For some reason, when I edit row in my datagrid, some columns have (an
unwanted) back color of yellow, while others correctly display with white
back color.

I can see no setting in my datagrid that could do this...

How can I stop this from happening ?

Thanks,

Bazza
 
B

Bazza Formez

And one more hint...

The columns with yellow background also have a sunken/recessed look to the
boarder of the editable item.

Thanks,
Bazza
 
J

John Saunders

Bazza Formez said:
And one more hint...

The columns with yellow background also have a sunken/recessed look to the
boarder of the editable item.

Bazza,

As I suggested in a reply to an earlier question from you: it's all in the
HTML. Take a look with View Source.

Chances are that you have an EditItemStyle set which is causing the effect,
but take a look in detail at what attributes are set on which columns, and
you'll see.

I often find it helpful to take the results of View Source and save them to
a file which I can view in Visual Studio. The Format Document command can
help me make much more sense of a mess of HTML. This is especially true in
VS2005, where the HTML view is much more helpful. You may also find the
Document Outline helpful.

John Saunders
 
B

Bazza Formez

Thanks for that John.. but I am still completely puzzled. I looked at the
HTML vis VS as you suggested, but cannot spot anything that could render the
backgorund I am seeing in threee of the editable fields... It seems to be
the browser going awry to me...

I just tried cutting and pasting that same HTML into this message to show
you... and the new client rendered it correctly before my eyes...

On my IE6 browser, the same HTML below renders with yellow background for
the email, phone & ext fields in the table below..



ID First Name Last Name User ID Password Email Phone Ext Fax Role
Update Cancel Delete 3


Very strange !

Tried same page with Firefox, and all ok.

Cheers,

Bruce
 
B

Bazza Formez

Try again with HTML:

<!--

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK rel="stylesheet" href="//Labcheck/Styles.css" type="text/css">
<!--<LINK REL="stylesheet" HREF="../timbertest.css"
<STYLE>
@import url( www.timbertest.co.nz/timbertest.css );
</STYLE>-->
</HEAD>
<body MS_POSITIONING="GridLayout" link="#000000" vlink="#000000">
<form name="Form1" method="post" action="ClientContacts.aspx?ClientID=2"
id="Form1">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE"
value="dDw3MjM4MzAzMjQ7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47aTwzPjs+O2w8dDxAMDxwPHA8bDxFZGl0SXRlbUluZGV4O1BhZ2VDb3VudDtfIUl0ZW1Db3VudDtfIURhdGFTb3VyY2VJdGVtQ291bnQ7RGF0YUtleXM7PjtsPGk8MD47aTwxPjtpPDE+O2k8MT47bDw+Oz4+Oz47Ozs7Ozs7Ozs7PjtsPGk8MD47PjtsPHQ8O2w8aTwxPjs+O2w8dDw7bDxpPDI+Oz47bDx0PHA8cDxsPFRleHQ7PjtsPDM7Pj47Pjs7Pjs+Pjs+Pjs+Pjt0PHA8cDxsPFRleHQ7PjtsPENhcnRlciBIb2x0IEhhcnZleSBQYW5lbHMgLSBNREY7Pj47Pjs7Pjs+Pjs+Pjs+ZuTzVjlPUO8ktySJ31AsbgT3rXQ="
/>

<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>

<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 32px; WIDTH: 864px;
POSITION: absolute; TOP: 128px"
cellSpacing="1" cellPadding="1" width="864" border="1">
<TR>
<TD><table cellspacing="0" cellpadding="4" rules="all" border="1"
id="dgClientContacts" style="width:1050px;border-collapse:collapse;">
<tr align="Center"
style="color:#EEEEEE;background-color:Silver;font-family:Arial;font-size:10pt;">
<td>&nbsp;</td><td>&nbsp;</td><td style="width:10px;">ID</td><td>First
Name</td><td>Last Name</td><td>User
ID</td><td>Password</td><td>Email</td><td>Phone</td><td>Ext</td><td>Fax</td><td>Role</td>
</tr><tr valign="Top"
style="background-color:#EEEEEE;font-family:Arial;font-size:8pt;">
<td><a
href="javascript:__doPostBack('dgClientContacts$_ctl2$_ctl0','')">Update</a>&nbsp;<a
href="javascript:__doPostBack('dgClientContacts$_ctl2$_ctl1','')">Cancel</a></td><td><a
href="javascript:__doPostBack('dgClientContacts$_ctl2$_ctl2','')">Delete</a></td><td>3</td><td><input
name="dgClientContacts:_ctl2:_ctl3" type="text" value="Bruce "
/></td><td><input name="dgClientContacts:_ctl2:_ctl4" type="text"
value="Forbes " /></td><td><input
name="dgClientContacts:_ctl2:_ctl5" type="text" value="bf
" /></td><td>
<input name="dgClientContacts:_ctl2:_ctl6" type="text"
value="ecurb112 " />
</td><td><input name="dgClientContacts:_ctl2:_ctl7" type="text"
value="(e-mail address removed) " /></td><td><input
name="dgClientContacts:_ctl2:_ctl8" type="text" value="(07) 362 8011 "
/></td><td><input name="dgClientContacts:_ctl2:_ctl9" type="text"
value="6000 " /></td><td><input name="dgClientContacts:_ctl2:_ctl10"
type="text" /></td><td><input name="dgClientContacts:_ctl2:_ctl11"
type="text" value="1" /></td>
</tr>
</table></TD>
</TR>
</TABLE>
<span id="lblClientName" style="width:266px;Z-INDEX: 102; LEFT: 272px;
POSITION: absolute; TOP: 32px">Carter Holt Harvey Panels - MDF</span><span
id="Label1" style="Z-INDEX: 103; LEFT: 184px; POSITION: absolute; TOP:
32px">Contacts at </span>
<input type="submit" name="btnAddContact" value="Add Contact"
id="btnAddContact" style="Z-INDEX: 104; LEFT: 32px; POSITION: absolute; TOP:
32px" />
<a id="HyperLink1" href="Clients.aspx" style="Z-INDEX: 105; LEFT: 40px;
POSITION: absolute; TOP: 72px">Back to Clients</a></form>
</body>
</HTML>
 
B

Bazza Formez

ID First Name Last Name User ID Password Email Phone Ext Fax
Role
Update Cancel Delete 3
 
B

Bazza Formez

Thanks for that John.. but I am still completely puzzled. I looked at the
HTML vis VS as you suggested, but cannot spot anything that could render the
background I am seeing in three of the editable fields... Very simple HTML
once seen in VS.
It seems to be
the browser going awry to me...I loaded the same page into Firefox, and
everything rendered as expect. Strange.

Thanks

Bazza
 
L

Lowell Heddings

Out of curiousity, do you have the Google toolbar installed with the
Autofill option turned on?

It will color all fields yellow that it can fill in.

That is probably your problem.

Lowell
 
G

Guest

You may want to check that you dont have a form autofill tool (google
toolbar). This tools can change the controls display at time.
 
B

Bazza Formez

Wow ! Thanks Lowell... Yes I have.... and it is new on this machine... I
didn't know that it did that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top