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

Discussion in 'ASP .Net' started by Bazza Formez, Dec 9, 2004.

  1. Bazza Formez

    Bazza Formez Guest

    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
     
    Bazza Formez, Dec 9, 2004
    #1
    1. Advertising

  2. Bazza Formez

    Bazza Formez Guest

    And one more hint...

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

    Thanks,
    Bazza



    "Bazza Formez" <> wrote in message
    news:TrOtd.14237$...
    > 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
    >
    >
     
    Bazza Formez, Dec 9, 2004
    #2
    1. Advertising

  3. "Bazza Formez" <> wrote in message
    news:zuOtd.14240$...
    > 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
     
    John Saunders, Dec 9, 2004
    #3
  4. Bazza Formez

    Bazza Formez Guest

    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
     
    Bazza Formez, Dec 9, 2004
    #4
  5. Bazza Formez

    Bazza Formez Guest

    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=" " /></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>


    "Bazza Formez" <> wrote in message
    news:7VOtd.14251$...
    > 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
    >
     
    Bazza Formez, Dec 9, 2004
    #5
  6. Bazza Formez

    Bazza Formez Guest

    ID First Name Last Name User ID Password Email Phone Ext Fax
    Role
    Update Cancel Delete 3
     
    Bazza Formez, Dec 9, 2004
    #6
  7. Bazza Formez

    Bazza Formez Guest

    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
     
    Bazza Formez, Dec 9, 2004
    #7
  8. Re: Grid edit item : what gives some bound columns a back colour?

    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




    Bazza Formez wrote:
    >
    > 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
     
    Lowell Heddings, Dec 9, 2004
    #8
  9. You may want to check that you dont have a form autofill tool (google
    toolbar). This tools can change the controls display at time.

    "Bazza Formez" wrote:

    > 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
    >
    >
    >
     
    =?Utf-8?B?bWF0YWdhdGlu?=, Dec 9, 2004
    #9
  10. Bazza Formez

    Bazza Formez Guest

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



    "Lowell Heddings" <> wrote in message
    news:...
    > 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
    >
    >
    >
    >
    > Bazza Formez wrote:
    >>
    >> 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
     
    Bazza Formez, Dec 9, 2004
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Z2FuZQ==?=
    Replies:
    2
    Views:
    582
    Bruno Alexandre
    Feb 16, 2007
  2. Ravichandran Mahalingam

    DG-Edit-Loosing data; bound columns - pushbuttons; dataReader

    Ravichandran Mahalingam, Jan 8, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    160
    Ravichandran Mahalingam
    Jan 8, 2004
  3. Ann
    Replies:
    0
    Views:
    173
  4. Vinki

    template columns and bound columns in gridview

    Vinki, Apr 25, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    925
    Vinki
    Apr 25, 2007
  5. jodleren
    Replies:
    2
    Views:
    221
    Thomas 'PointedEars' Lahn
    Jan 12, 2008
Loading...

Share This Page