Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Loosing css?

    Hi all!

    I have a problem with my datagrid and css.

    To fill my grid, I have a database connection. The sql is partly built from
    drop down lists (select * from myTable where id='ddl value'.

    My problem is, that when I select something in my drop down and the page
    reloads, there seems to be some odd spacing around the controls in the
    cells.

    I have set padding (left, right, bottom, top), cellpadding and cellspacing
    to 0px but I canīt get ridd of it.

    Im out of ideas here :(

    Do you have any?

    /Marre


    MA Guest

  2. Similar Questions and Discussions

    1. Property is loosing value
      Hello NG, I've created a custom component inherited from "System.Web.UI.Webcontrold.Button" and added a new String Property .... Private...
    2. onClick without loosing data
      I have a page with several radio buttons. (Add, Deactivate). When I click on Add, an add form is displayed on a page and when and it works the...
    3. Loosing roles between two pages ?
      Ok Thanks, Here is what i've found in MS Press literature and it's ok : If FormsAuthentication.Authenticate( _ txtNom.Text, txtMP.Text) Then...
    4. Problem with loosing top of windows
      Sometimes when I am working on an image in PS7 the top blue title bar of the window gets up under the menu bar at the top of the page and I cant...
    5. Loosing things on stage?
      Check the "Animate in background" option when you create the projector. Andrew
  3. #2

    Default Re: Loosing css?

    How are you laying the controls out? Are using Flow Layout? Using html
    tables is the best way of keeping consistent layout when page changes.

    Eliyahu

    "MA" <news@.removethis.supremelink.se> wrote in message
    news:357jpdF4j0cq2U1@individual.net...
    > Hi all!
    >
    > I have a problem with my datagrid and css.
    >
    > To fill my grid, I have a database connection. The sql is partly built
    from
    > drop down lists (select * from myTable where id='ddl value'.
    >
    > My problem is, that when I select something in my drop down and the page
    > reloads, there seems to be some odd spacing around the controls in the
    > cells.
    >
    > I have set padding (left, right, bottom, top), cellpadding and cellspacing
    > to 0px but I canīt get ridd of it.
    >
    > Im out of ideas here :(
    >
    > Do you have any?
    >
    > /Marre
    >
    >

    Eliyahu Goldin Guest

  4. #3

    Default Re: Loosing css?

    Well, itīs inside the grid cell.
    Lets say i have two rows in a cell. After the postback, the space between
    those rows are bigger. Iīm confused ;)

    /Marre

    "Eliyahu Goldin" <removemeegoldin@monarchmed.com> wrote in message
    news:uDi12Fl$EHA.3336@TK2MSFTNGP11.phx.gbl...
    > How are you laying the controls out? Are using Flow Layout? Using html
    > tables is the best way of keeping consistent layout when page changes.
    >
    > Eliyahu
    >
    > "MA" <news@.removethis.supremelink.se> wrote in message
    > news:357jpdF4j0cq2U1@individual.net...
    >> Hi all!
    >>
    >> I have a problem with my datagrid and css.
    >>
    >> To fill my grid, I have a database connection. The sql is partly built
    > from
    >> drop down lists (select * from myTable where id='ddl value'.
    >>
    >> My problem is, that when I select something in my drop down and the page
    >> reloads, there seems to be some odd spacing around the controls in the
    >> cells.
    >>
    >> I have set padding (left, right, bottom, top), cellpadding and
    >> cellspacing
    >> to 0px but I canīt get ridd of it.
    >>
    >> Im out of ideas here :(
    >>
    >> Do you have any?
    >>
    >> /Marre
    >>
    >>
    >
    >

    MA Guest

  5. #4

    Default Re: Loosing css?

    Could you show us a sample of the HTML that is rendered? It is possible that
    ASP.NET is inserting a SPAN tag that needs to be accounted for.

    "MA" <news@.removethis.supremelink.se> wrote in message
    news:357jpdF4j0cq2U1@individual.net...
    > Hi all!
    >
    > I have a problem with my datagrid and css.
    >
    > To fill my grid, I have a database connection. The sql is partly built
    > from drop down lists (select * from myTable where id='ddl value'.
    >
    > My problem is, that when I select something in my drop down and the page
    > reloads, there seems to be some odd spacing around the controls in the
    > cells.
    >
    > I have set padding (left, right, bottom, top), cellpadding and cellspacing
    > to 0px but I canīt get ridd of it.
    >
    > Im out of ideas here :(
    >
    > Do you have any?
    >
    > /Marre
    >
    Ken Cox [Microsoft MVP] Guest

  6. #5

    Default Re: Loosing css?

    Hi!

    Sorry for not answering erlier.
    A gridcell looks like this after a postback:
    <td><nobr><div class='calendar_cell' title='text: text
    text1: 1
    text2: 2
    text3: 3
    text4: 4
    --------------------------------------------
    ' alt='text: text
    text1: 1
    text2: 2
    text3: 3
    text4: 4
    --------------------------------------------
    '>my text 1</div></nobr><nobr><div class='calendar_cell' title='text: text
    text1: 1
    text2: 2
    text3: 3
    text4: 4
    --------------------------------------------
    ' alt='text: text
    text1: 1
    text2: 2
    text3: 3
    text4: 4
    --------------------------------------------
    '>my text 2</div></nobr></td>

    As you can see, there is a lot of text inside the title and alt. But this
    text is there even before the postback.

    I have tried to put this text in my calendar_cell-class:
    ..calendar_cell

    {

    cellpadding: 0px;

    cellspacing: 0px;

    padding: 0px 0px 0px 0px;

    padding-bottom: 0px;

    padding-left: 0px;

    padding-right: 0px;

    padding-top: 0px;

    }

    But it?s not working at all!



    /Marre

    "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
    news:eW3A9JBAFHA.1400@TK2MSFTNGP11.phx.gbl...
    > Could you show us a sample of the HTML that is rendered? It is possible
    > that ASP.NET is inserting a SPAN tag that needs to be accounted for.
    >
    > "MA" <news@.removethis.supremelink.se> wrote in message
    > news:357jpdF4j0cq2U1@individual.net...
    >> Hi all!
    >>
    >> I have a problem with my datagrid and css.
    >>
    >> To fill my grid, I have a database connection. The sql is partly built
    >> from drop down lists (select * from myTable where id='ddl value'.
    >>
    >> My problem is, that when I select something in my drop down and the page
    >> reloads, there seems to be some odd spacing around the controls in the
    >> cells.
    >>
    >> I have set padding (left, right, bottom, top), cellpadding and
    >> cellspacing to 0px but I canīt get ridd of it.
    >>
    >> Im out of ideas here :(
    >>
    >> Do you have any?
    >>
    >> /Marre
    >>
    >

    MA Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139