Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / DataGrid / January 2005

Tip: Looking for answers? Try searching our database.

Loosing css?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MA - 19 Jan 2005 17:29 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.