Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7049383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:00:27+00:00 2026-05-28T03:00:27+00:00

I had used a webgrid in a partial view in my project. I had

  • 0

I had used a webgrid in a partial view in my project. I had implemented it fine with table style as:

.webgridtablestyle
{
width: 100%;
height: auto;

}

It displays fine. Now i want to define the different widths for different headers in webgrid. So i applied it as:

grid.Column("EquipmentManfacturer", header: "Warranty Provider", style:"width:30%")

But the width had not applied. I tried by giving table-layout: fixed in table style also.The table layout style had applied but the width style had not applied for header. Can any one please help me how to apply different widths for different headers in webgrid. I need to user only percentage for width of the table as the dashboard in which the webgrid was placed was resizable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:00:27+00:00Added an answer on May 28, 2026 at 3:00 am

    As I understand, the style property is actually which class the column gets.

    So create a class with the width you want and use that class in the style property.

    I.e.

    .column1
    {
      width: 30%;
    }
    

    and then

    grid.Column("EquipmentManfacturer", header: "Warranty Provider", style:"column1")
    

    Edit: the width property for the whole grid needs to be set, set a class with tableStyle on the grid and have that class define a width property

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i had used the following code in master page of asp.net project <a runat=server
My new project is to renew Software that a customer had used for years.
In my project I had used CSS sprites as there was lots of images,now
I had used Server Explorer and related tools for graphical database development with Microsoft
I had used several ways to do some simple integer arithmetic in BASH (3.2).
I had used the below code to get the row index of the UIPickerView
I'm looking into development standards fro JavaScript. I had previously used Doulgas Crockfords Javascript
I had a property that used to be not-null=true. Values aren't necessary for that
I used to use a guitar tab site and it had a feature where
I had a method with a lot of persistence calls that used a nHibernate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.