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 - 19 Jan 2005 18:07 GMT
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
> Hi all!
>
[quoted text clipped - 15 lines]
>
> /Marre
MA - 21 Jan 2005 14:49 GMT
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
> 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.
[quoted text clipped - 22 lines]
>>
>> /Marre
Ken Cox [Microsoft MVP] - 21 Jan 2005 23:39 GMT
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.
> Hi all!
>
[quoted text clipped - 15 lines]
>
> /Marre
MA - 26 Jan 2005 15:48 GMT
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
> 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.
[quoted text clipped - 18 lines]
>>
>> /Marre