MVC 3 Razor webgrid - how to change the table width

Multi tool use
Multi tool use












1















I have a problem where whatever I try I can't change the width of the webgrid table. It ignores the css of its parent div and changing the width of the grid using css doesn't have any effect.



Webgrid partial view



@model IEnumerable<UserManager.Models.vw_UserManager_Model>
@{WebGrid grid = new WebGrid(Model, canPage: true, canSort: true, rowsPerPage: 15, selectionFieldName: "selectedRow", fieldNamePrefix: "gridItem");}
<b>@Html.Label("Total number of records displayed: ")</b>
@Html.Label(grid.TotalRowCount.ToString())
@grid.GetHtml(
fillEmptyRows: true,
tableStyle: "webgrid",
alternatingRowStyle: "webgrid-alternating-row",
headerStyle: "webgrid-header",
footerStyle: "webgrid-footer",
selectedRowStyle: "webgrid-selected-row",
rowStyle: "webgrid-row-style",
mode: WebGridPagerModes.All,
columns: new {
grid.Column("UserName"),
grid.Column("salutation"),
grid.Column("FirstName"),
grid.Column("LastName"),
grid.Column("Password"),
grid.Column(header: "Session Status", canSort: true, format: @<text><input name="User logged in"
type="checkbox" @(item.session_status == 1 ? "Checked" : null) onclick="logUserOff('@Url.Action("LogUserOff", "UserManager", new {userid = item.userid} )')" id="chkboxIsActive" /></text>),
grid.Column("isactive"),
//grid.Column("isapproved"),
grid.Column("MaxConcurrentUsers"),
grid.Column("email"),
grid.Column("group_name"),
grid.Column("module_name"),
grid.Column(header:"Edit", format:@<text><div id="btnEditSelectedRow">
@Html.ActionLink("Edit record", "EditUser", "UserManager", new {
userid = item.userid,
salutation = item.salutation,
firstname = item.FirstName,
lastname = item.LastName,
password = item.Password,
isactive = item.isactive,
isapproved = item.IsApproved,
maxconcurrentusers = item.MaxConcurrentUsers,
email = item.email,
rowtype = item.rowtype,
module = item.module_name,
group = item.group_name }, null)</div></text>),

grid.Column(header:"Delete", format:@<text><div id="btnDelSelectedRow">
@Html.ActionLink("Delete record", "DeleteUser", "UserManager", new {
userid = item.userid,
username = item.UserName,
salutation = item.salutation,
firstname = item.FirstName,
lastname = item.LastName,
password = item.Password,
isactive = item.isactive,
email = item.email,
module = item.module_name,
rowtype = item.rowtype,
group = item.group_name }, null)</div></text>),
})


Webgrid CSS



.webgrid
{
width: 500px;
border: 0px;
border-collapse: collapse;
oveflow:scroll auto;
}

.webgrid a
{
color: #000;
}

.webgrid-header
{
padding: 6px 5px;
text-align: center;
background-color: #e8eef4;
border-bottom: 2px solid #3966A2;
height: 40px;

border-top: 2px solid #D6E8FF;
border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-footer
{
padding: 6px 5px;
text-align: center;
background-color: #e8eef4;
border-top: 2px solid #3966A2;
height: 30px;

border-bottom: 2px solid #D6E8FF;
border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-alternating-row
{
height: 30px;
background-color: #f2f2f2;
border-bottom: 1px solid #d2d2d2;

border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-row-style
{
height: 30px;
border-bottom: 1px solid #d2d2d2;

border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-selected-row
{
font-weight: bold;
}


enter image description here



enter image description here










share|improve this question


















  • 1





    ewwwwwww ... explorer

    – TigOldBitties
    Dec 19 '12 at 10:16











  • @TigOldBitties Yeah real mature. It's the same problem in chrome.

    – nick gowdy
    Dec 19 '12 at 10:18











  • Who said I was mature? table-layout fixed if you want a table to stay the width you set to the cells

    – TigOldBitties
    Dec 19 '12 at 10:20













  • <sarcasm></sarcasm>

    – nick gowdy
    Dec 19 '12 at 10:28











  • So you think I was being sarcastic about table-layout fixed? Hmpf ... width 500px on a table does diddly squat if you don't have table layout fixed. As I can see from your screenshot the cells are pushing the width of the table beyond 500px.

    – TigOldBitties
    Dec 19 '12 at 14:05
















1















I have a problem where whatever I try I can't change the width of the webgrid table. It ignores the css of its parent div and changing the width of the grid using css doesn't have any effect.



Webgrid partial view



@model IEnumerable<UserManager.Models.vw_UserManager_Model>
@{WebGrid grid = new WebGrid(Model, canPage: true, canSort: true, rowsPerPage: 15, selectionFieldName: "selectedRow", fieldNamePrefix: "gridItem");}
<b>@Html.Label("Total number of records displayed: ")</b>
@Html.Label(grid.TotalRowCount.ToString())
@grid.GetHtml(
fillEmptyRows: true,
tableStyle: "webgrid",
alternatingRowStyle: "webgrid-alternating-row",
headerStyle: "webgrid-header",
footerStyle: "webgrid-footer",
selectedRowStyle: "webgrid-selected-row",
rowStyle: "webgrid-row-style",
mode: WebGridPagerModes.All,
columns: new {
grid.Column("UserName"),
grid.Column("salutation"),
grid.Column("FirstName"),
grid.Column("LastName"),
grid.Column("Password"),
grid.Column(header: "Session Status", canSort: true, format: @<text><input name="User logged in"
type="checkbox" @(item.session_status == 1 ? "Checked" : null) onclick="logUserOff('@Url.Action("LogUserOff", "UserManager", new {userid = item.userid} )')" id="chkboxIsActive" /></text>),
grid.Column("isactive"),
//grid.Column("isapproved"),
grid.Column("MaxConcurrentUsers"),
grid.Column("email"),
grid.Column("group_name"),
grid.Column("module_name"),
grid.Column(header:"Edit", format:@<text><div id="btnEditSelectedRow">
@Html.ActionLink("Edit record", "EditUser", "UserManager", new {
userid = item.userid,
salutation = item.salutation,
firstname = item.FirstName,
lastname = item.LastName,
password = item.Password,
isactive = item.isactive,
isapproved = item.IsApproved,
maxconcurrentusers = item.MaxConcurrentUsers,
email = item.email,
rowtype = item.rowtype,
module = item.module_name,
group = item.group_name }, null)</div></text>),

grid.Column(header:"Delete", format:@<text><div id="btnDelSelectedRow">
@Html.ActionLink("Delete record", "DeleteUser", "UserManager", new {
userid = item.userid,
username = item.UserName,
salutation = item.salutation,
firstname = item.FirstName,
lastname = item.LastName,
password = item.Password,
isactive = item.isactive,
email = item.email,
module = item.module_name,
rowtype = item.rowtype,
group = item.group_name }, null)</div></text>),
})


Webgrid CSS



.webgrid
{
width: 500px;
border: 0px;
border-collapse: collapse;
oveflow:scroll auto;
}

.webgrid a
{
color: #000;
}

.webgrid-header
{
padding: 6px 5px;
text-align: center;
background-color: #e8eef4;
border-bottom: 2px solid #3966A2;
height: 40px;

border-top: 2px solid #D6E8FF;
border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-footer
{
padding: 6px 5px;
text-align: center;
background-color: #e8eef4;
border-top: 2px solid #3966A2;
height: 30px;

border-bottom: 2px solid #D6E8FF;
border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-alternating-row
{
height: 30px;
background-color: #f2f2f2;
border-bottom: 1px solid #d2d2d2;

border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-row-style
{
height: 30px;
border-bottom: 1px solid #d2d2d2;

border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-selected-row
{
font-weight: bold;
}


enter image description here



enter image description here










share|improve this question


















  • 1





    ewwwwwww ... explorer

    – TigOldBitties
    Dec 19 '12 at 10:16











  • @TigOldBitties Yeah real mature. It's the same problem in chrome.

    – nick gowdy
    Dec 19 '12 at 10:18











  • Who said I was mature? table-layout fixed if you want a table to stay the width you set to the cells

    – TigOldBitties
    Dec 19 '12 at 10:20













  • <sarcasm></sarcasm>

    – nick gowdy
    Dec 19 '12 at 10:28











  • So you think I was being sarcastic about table-layout fixed? Hmpf ... width 500px on a table does diddly squat if you don't have table layout fixed. As I can see from your screenshot the cells are pushing the width of the table beyond 500px.

    – TigOldBitties
    Dec 19 '12 at 14:05














1












1








1








I have a problem where whatever I try I can't change the width of the webgrid table. It ignores the css of its parent div and changing the width of the grid using css doesn't have any effect.



Webgrid partial view



@model IEnumerable<UserManager.Models.vw_UserManager_Model>
@{WebGrid grid = new WebGrid(Model, canPage: true, canSort: true, rowsPerPage: 15, selectionFieldName: "selectedRow", fieldNamePrefix: "gridItem");}
<b>@Html.Label("Total number of records displayed: ")</b>
@Html.Label(grid.TotalRowCount.ToString())
@grid.GetHtml(
fillEmptyRows: true,
tableStyle: "webgrid",
alternatingRowStyle: "webgrid-alternating-row",
headerStyle: "webgrid-header",
footerStyle: "webgrid-footer",
selectedRowStyle: "webgrid-selected-row",
rowStyle: "webgrid-row-style",
mode: WebGridPagerModes.All,
columns: new {
grid.Column("UserName"),
grid.Column("salutation"),
grid.Column("FirstName"),
grid.Column("LastName"),
grid.Column("Password"),
grid.Column(header: "Session Status", canSort: true, format: @<text><input name="User logged in"
type="checkbox" @(item.session_status == 1 ? "Checked" : null) onclick="logUserOff('@Url.Action("LogUserOff", "UserManager", new {userid = item.userid} )')" id="chkboxIsActive" /></text>),
grid.Column("isactive"),
//grid.Column("isapproved"),
grid.Column("MaxConcurrentUsers"),
grid.Column("email"),
grid.Column("group_name"),
grid.Column("module_name"),
grid.Column(header:"Edit", format:@<text><div id="btnEditSelectedRow">
@Html.ActionLink("Edit record", "EditUser", "UserManager", new {
userid = item.userid,
salutation = item.salutation,
firstname = item.FirstName,
lastname = item.LastName,
password = item.Password,
isactive = item.isactive,
isapproved = item.IsApproved,
maxconcurrentusers = item.MaxConcurrentUsers,
email = item.email,
rowtype = item.rowtype,
module = item.module_name,
group = item.group_name }, null)</div></text>),

grid.Column(header:"Delete", format:@<text><div id="btnDelSelectedRow">
@Html.ActionLink("Delete record", "DeleteUser", "UserManager", new {
userid = item.userid,
username = item.UserName,
salutation = item.salutation,
firstname = item.FirstName,
lastname = item.LastName,
password = item.Password,
isactive = item.isactive,
email = item.email,
module = item.module_name,
rowtype = item.rowtype,
group = item.group_name }, null)</div></text>),
})


Webgrid CSS



.webgrid
{
width: 500px;
border: 0px;
border-collapse: collapse;
oveflow:scroll auto;
}

.webgrid a
{
color: #000;
}

.webgrid-header
{
padding: 6px 5px;
text-align: center;
background-color: #e8eef4;
border-bottom: 2px solid #3966A2;
height: 40px;

border-top: 2px solid #D6E8FF;
border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-footer
{
padding: 6px 5px;
text-align: center;
background-color: #e8eef4;
border-top: 2px solid #3966A2;
height: 30px;

border-bottom: 2px solid #D6E8FF;
border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-alternating-row
{
height: 30px;
background-color: #f2f2f2;
border-bottom: 1px solid #d2d2d2;

border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-row-style
{
height: 30px;
border-bottom: 1px solid #d2d2d2;

border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-selected-row
{
font-weight: bold;
}


enter image description here



enter image description here










share|improve this question














I have a problem where whatever I try I can't change the width of the webgrid table. It ignores the css of its parent div and changing the width of the grid using css doesn't have any effect.



Webgrid partial view



@model IEnumerable<UserManager.Models.vw_UserManager_Model>
@{WebGrid grid = new WebGrid(Model, canPage: true, canSort: true, rowsPerPage: 15, selectionFieldName: "selectedRow", fieldNamePrefix: "gridItem");}
<b>@Html.Label("Total number of records displayed: ")</b>
@Html.Label(grid.TotalRowCount.ToString())
@grid.GetHtml(
fillEmptyRows: true,
tableStyle: "webgrid",
alternatingRowStyle: "webgrid-alternating-row",
headerStyle: "webgrid-header",
footerStyle: "webgrid-footer",
selectedRowStyle: "webgrid-selected-row",
rowStyle: "webgrid-row-style",
mode: WebGridPagerModes.All,
columns: new {
grid.Column("UserName"),
grid.Column("salutation"),
grid.Column("FirstName"),
grid.Column("LastName"),
grid.Column("Password"),
grid.Column(header: "Session Status", canSort: true, format: @<text><input name="User logged in"
type="checkbox" @(item.session_status == 1 ? "Checked" : null) onclick="logUserOff('@Url.Action("LogUserOff", "UserManager", new {userid = item.userid} )')" id="chkboxIsActive" /></text>),
grid.Column("isactive"),
//grid.Column("isapproved"),
grid.Column("MaxConcurrentUsers"),
grid.Column("email"),
grid.Column("group_name"),
grid.Column("module_name"),
grid.Column(header:"Edit", format:@<text><div id="btnEditSelectedRow">
@Html.ActionLink("Edit record", "EditUser", "UserManager", new {
userid = item.userid,
salutation = item.salutation,
firstname = item.FirstName,
lastname = item.LastName,
password = item.Password,
isactive = item.isactive,
isapproved = item.IsApproved,
maxconcurrentusers = item.MaxConcurrentUsers,
email = item.email,
rowtype = item.rowtype,
module = item.module_name,
group = item.group_name }, null)</div></text>),

grid.Column(header:"Delete", format:@<text><div id="btnDelSelectedRow">
@Html.ActionLink("Delete record", "DeleteUser", "UserManager", new {
userid = item.userid,
username = item.UserName,
salutation = item.salutation,
firstname = item.FirstName,
lastname = item.LastName,
password = item.Password,
isactive = item.isactive,
email = item.email,
module = item.module_name,
rowtype = item.rowtype,
group = item.group_name }, null)</div></text>),
})


Webgrid CSS



.webgrid
{
width: 500px;
border: 0px;
border-collapse: collapse;
oveflow:scroll auto;
}

.webgrid a
{
color: #000;
}

.webgrid-header
{
padding: 6px 5px;
text-align: center;
background-color: #e8eef4;
border-bottom: 2px solid #3966A2;
height: 40px;

border-top: 2px solid #D6E8FF;
border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-footer
{
padding: 6px 5px;
text-align: center;
background-color: #e8eef4;
border-top: 2px solid #3966A2;
height: 30px;

border-bottom: 2px solid #D6E8FF;
border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-alternating-row
{
height: 30px;
background-color: #f2f2f2;
border-bottom: 1px solid #d2d2d2;

border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-row-style
{
height: 30px;
border-bottom: 1px solid #d2d2d2;

border-left: 2px solid #D6E8FF;
border-right: 2px solid #D6E8FF;
}

.webgrid-selected-row
{
font-weight: bold;
}


enter image description here



enter image description here







asp.net-mvc-3 razor webgrid






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 19 '12 at 10:14









nick gowdynick gowdy

2,3441465123




2,3441465123








  • 1





    ewwwwwww ... explorer

    – TigOldBitties
    Dec 19 '12 at 10:16











  • @TigOldBitties Yeah real mature. It's the same problem in chrome.

    – nick gowdy
    Dec 19 '12 at 10:18











  • Who said I was mature? table-layout fixed if you want a table to stay the width you set to the cells

    – TigOldBitties
    Dec 19 '12 at 10:20













  • <sarcasm></sarcasm>

    – nick gowdy
    Dec 19 '12 at 10:28











  • So you think I was being sarcastic about table-layout fixed? Hmpf ... width 500px on a table does diddly squat if you don't have table layout fixed. As I can see from your screenshot the cells are pushing the width of the table beyond 500px.

    – TigOldBitties
    Dec 19 '12 at 14:05














  • 1





    ewwwwwww ... explorer

    – TigOldBitties
    Dec 19 '12 at 10:16











  • @TigOldBitties Yeah real mature. It's the same problem in chrome.

    – nick gowdy
    Dec 19 '12 at 10:18











  • Who said I was mature? table-layout fixed if you want a table to stay the width you set to the cells

    – TigOldBitties
    Dec 19 '12 at 10:20













  • <sarcasm></sarcasm>

    – nick gowdy
    Dec 19 '12 at 10:28











  • So you think I was being sarcastic about table-layout fixed? Hmpf ... width 500px on a table does diddly squat if you don't have table layout fixed. As I can see from your screenshot the cells are pushing the width of the table beyond 500px.

    – TigOldBitties
    Dec 19 '12 at 14:05








1




1





ewwwwwww ... explorer

– TigOldBitties
Dec 19 '12 at 10:16





ewwwwwww ... explorer

– TigOldBitties
Dec 19 '12 at 10:16













@TigOldBitties Yeah real mature. It's the same problem in chrome.

– nick gowdy
Dec 19 '12 at 10:18





@TigOldBitties Yeah real mature. It's the same problem in chrome.

– nick gowdy
Dec 19 '12 at 10:18













Who said I was mature? table-layout fixed if you want a table to stay the width you set to the cells

– TigOldBitties
Dec 19 '12 at 10:20







Who said I was mature? table-layout fixed if you want a table to stay the width you set to the cells

– TigOldBitties
Dec 19 '12 at 10:20















<sarcasm></sarcasm>

– nick gowdy
Dec 19 '12 at 10:28





<sarcasm></sarcasm>

– nick gowdy
Dec 19 '12 at 10:28













So you think I was being sarcastic about table-layout fixed? Hmpf ... width 500px on a table does diddly squat if you don't have table layout fixed. As I can see from your screenshot the cells are pushing the width of the table beyond 500px.

– TigOldBitties
Dec 19 '12 at 14:05





So you think I was being sarcastic about table-layout fixed? Hmpf ... width 500px on a table does diddly squat if you don't have table layout fixed. As I can see from your screenshot the cells are pushing the width of the table beyond 500px.

– TigOldBitties
Dec 19 '12 at 14:05












2 Answers
2






active

oldest

votes


















0














The problem is in the .css file that Visual Studio generated. Open ContentSite.css & you will find a style definition like:



   .content-wrapper {
margin: 0 auto;
max-width: 960px;
}


the max-width is too small for your table, so enlarge it. (And reload the browser b/c broswers tend to cache .css files)



Also, you can adjust the Table DataCell that has the bad wrapping by replacing with (Although, if you only adjust the w/out increasing the max width, it will force some other cell(s) to wrap)






share|improve this answer































    0














    Site.css generated by MVC3 has .page {width: 98%;} You can change that to some fixed value, like, "width: 2000px;". This helps, but if someone knows how to make it expand to the size of the WebGrid, that would be much better!






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f13950015%2fmvc-3-razor-webgrid-how-to-change-the-table-width%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      The problem is in the .css file that Visual Studio generated. Open ContentSite.css & you will find a style definition like:



         .content-wrapper {
      margin: 0 auto;
      max-width: 960px;
      }


      the max-width is too small for your table, so enlarge it. (And reload the browser b/c broswers tend to cache .css files)



      Also, you can adjust the Table DataCell that has the bad wrapping by replacing with (Although, if you only adjust the w/out increasing the max width, it will force some other cell(s) to wrap)






      share|improve this answer




























        0














        The problem is in the .css file that Visual Studio generated. Open ContentSite.css & you will find a style definition like:



           .content-wrapper {
        margin: 0 auto;
        max-width: 960px;
        }


        the max-width is too small for your table, so enlarge it. (And reload the browser b/c broswers tend to cache .css files)



        Also, you can adjust the Table DataCell that has the bad wrapping by replacing with (Although, if you only adjust the w/out increasing the max width, it will force some other cell(s) to wrap)






        share|improve this answer


























          0












          0








          0







          The problem is in the .css file that Visual Studio generated. Open ContentSite.css & you will find a style definition like:



             .content-wrapper {
          margin: 0 auto;
          max-width: 960px;
          }


          the max-width is too small for your table, so enlarge it. (And reload the browser b/c broswers tend to cache .css files)



          Also, you can adjust the Table DataCell that has the bad wrapping by replacing with (Although, if you only adjust the w/out increasing the max width, it will force some other cell(s) to wrap)






          share|improve this answer













          The problem is in the .css file that Visual Studio generated. Open ContentSite.css & you will find a style definition like:



             .content-wrapper {
          margin: 0 auto;
          max-width: 960px;
          }


          the max-width is too small for your table, so enlarge it. (And reload the browser b/c broswers tend to cache .css files)



          Also, you can adjust the Table DataCell that has the bad wrapping by replacing with (Although, if you only adjust the w/out increasing the max width, it will force some other cell(s) to wrap)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 26 '13 at 20:33









          WilliamWilliam

          1




          1

























              0














              Site.css generated by MVC3 has .page {width: 98%;} You can change that to some fixed value, like, "width: 2000px;". This helps, but if someone knows how to make it expand to the size of the WebGrid, that would be much better!






              share|improve this answer




























                0














                Site.css generated by MVC3 has .page {width: 98%;} You can change that to some fixed value, like, "width: 2000px;". This helps, but if someone knows how to make it expand to the size of the WebGrid, that would be much better!






                share|improve this answer


























                  0












                  0








                  0







                  Site.css generated by MVC3 has .page {width: 98%;} You can change that to some fixed value, like, "width: 2000px;". This helps, but if someone knows how to make it expand to the size of the WebGrid, that would be much better!






                  share|improve this answer













                  Site.css generated by MVC3 has .page {width: 98%;} You can change that to some fixed value, like, "width: 2000px;". This helps, but if someone knows how to make it expand to the size of the WebGrid, that would be much better!







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 17 '13 at 17:41









                  soRichsoRich

                  33




                  33






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f13950015%2fmvc-3-razor-webgrid-how-to-change-the-table-width%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      QP23xPqgd a9V,mNfXOYf Z,Tb 9bWnrPfiUPF,Tg34hPHHGx6xVbEJJt14vXf9WSM,dM6crZ6NfCqqrcsK28aN5up,plKPXjSHT 4
                      jBJn0xYUn69 DeeVuf

                      Popular posts from this blog

                      Monofisismo

                      Angular Downloading a file using contenturl with Basic Authentication

                      Olmecas