?
Solved

Fix the size of cells in an asp.net table

Posted on 2011-04-30
6
Medium Priority
?
469 Views
Last Modified: 2012-05-11
Hi experts

I am trying to develop a web-site using Visual web developer and asp.net  3.5,  i have an asp.net table with 3 columns and 10 rows, i am working on the third column-cell of the first row which i want to resize, the problem i am having is that by resizing the third column the first two columns are being resized as well, is there any way to fix the size of a table cell so that it cannot be resized when altering other columns and rows in the table, one way i have thought of doing it is put a div inside the cell that i want to fix the size of, but i just wondered if there is a simpler way of doing this. Hope somebody can help
0
Comment
Question by:dizzycat
6 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35498208
How are you resizing the columns please post the relevant code.
0
 

Author Comment

by:dizzycat
ID: 35498254
I am just trying to resize the columns and rows
Using the GUI.
0
 
LVL 3

Expert Comment

by:tbsolutions
ID: 35498284
Did you try to set manually the width of the two columns you don't want to be resized?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dizzycat
ID: 35498322
I just assumed that if I could not set the cell
Sizes using the GUI then it could not be done
manually, I will try it and let you know.
0
 
LVL 17

Accepted Solution

by:
Carlos Villegas earned 1500 total points
ID: 35498337
Yes you can do that by using the GUI:
1. Select the table.
2. On properties window, click on Rows collection.
3. Select the row and click on Cells collection.
4. Edit yours cells properties.

But I prefer edit the source directly, like this:
<asp:Table ID="Table1" runat="server">
    <asp:TableHeaderRow>
        <asp:TableHeaderCell Width="100px">
            A
        </asp:TableHeaderCell>
        <asp:TableHeaderCell Width="100px">
            B
        </asp:TableHeaderCell>
        <asp:TableHeaderCell Width="200px">
            C
        </asp:TableHeaderCell>
    </asp:TableHeaderRow>
    <asp:TableRow>
        <asp:TableCell>
            1
        </asp:TableCell>
        <asp:TableCell>
            2
        </asp:TableCell>
        <asp:TableCell>
            3
        </asp:TableCell>
    </asp:TableRow>
    <asp:TableRow>
        <asp:TableCell>
            1
        </asp:TableCell>
        <asp:TableCell>
            2
        </asp:TableCell>
        <asp:TableCell>
            3
        </asp:TableCell>
    </asp:TableRow>
    <asp:TableRow>
        <asp:TableCell>
            1
        </asp:TableCell>
        <asp:TableCell>
            2
        </asp:TableCell>
        <asp:TableCell>
            3
        </asp:TableCell>
    </asp:TableRow>
</asp:Table>

Open in new window

0
 

Author Closing Comment

by:dizzycat
ID: 35498355
Thanks, this is what I was looking for.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question