title: How to set auto table width according to main page?
body: <p>I use consomcontrols.grid on asp.net.I have a width problem specially on IE on page.
  I want to set gridview's width auto according to main page.</p>
  
  <p>My grid's width can be bigger than page width,i can be able to use scroll inside page div.</p>
  
  <p>This is my problem's screenshot: (IE 9) (Problem lives all browser when page zoom)</p>
  
  <p><img src="https://i.stack.imgur.com/c0Fbo.png" alt="enter image description here"></p>
  
  <p>I use masterpage :</p>
  
  <pre><code>&lt;div style="width:90%"&gt;
       &lt;asp:ContentPlaceHolder ID="MainContent" runat="server" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is my page:</p>
  
  <pre><code>&lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
   &lt;table border="0" cellpadding="0" cellspacing="0"&gt;
     &lt;tr&gt;
       &lt;td&gt;&lt;h2 style="padding-bottom:5px;"&gt;Stil Tanım Ekranı&lt;/h2&gt;&lt;/td&gt;
        &lt;/tr&gt;
          &lt;tr&gt;
            &lt;td&gt;
  
              &lt;table border="0" cellpadding="2" cellspacing="1"&gt;
                &lt;tr&gt;
                   &lt;td&gt;
                       &lt;div id="Div1" style="width:100%;overflow:auto;"&gt;
                           &lt;table class="KolonClass" border="0" cellpadding="0" cellspacing="0" width="920px"&gt;
                      &lt;tr&gt;
                      &lt;td&gt;
  
   &lt;cc1:xGrid ID="XGrid_StilKodlari" runat="server" 
               Width="100%"                                                                       
               AutoGenerateColumns="false"
               AllowPaging="false"
               AllowSorting="false"
               ShowHeaderWhenEmpty="true"
               GridLines="Both"
               BorderStyle="Solid"
               AscImage="~/Images/asc.png"
               DescImage="~/Images/desc.png"
               PagerSettings-Mode="NumericFirstLast"
               PagerSettings-PageButtonCount="5"                                                                                          
               EnableHeightResolver="false"                                                                           
               EnableRowClick="false"
               CssClass="Grdview"
               EmptyDataRowStyle-CssClass="Grdview_EmptyDataRowStyle"
               HeaderStyle-CssClass="Grdview_HeaderStyle"
               RowStyle-CssClass="Grdview_RowStyle"
               AlternatingRowStyle-CssClass="Grdview_AlternatingRowStyle"
               SelectedRowStyle-CssClass="Grdview_SelectedRowStyle"
               FooterStyle-CssClass="Grdview_FooterStyle"                                                                    
               OnRowDataBound="XGrid_StilKodlari_RowDataBound"&gt;
   &lt;Columns&gt;
  
  
  
      &lt;asp:TemplateField HeaderText="Önizleme" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px" &gt;
       &lt;ItemTemplate&gt;
         &lt;asp:Label CssClass="onizleme" runat="server" ID="lbl_onizleme" Text="F8 IMZA" Width="80px"/&gt;
       &lt;/ItemTemplate&gt;
                                                                          &lt;/asp:TemplateField&gt;
  
     &lt;asp:TemplateField  HeaderText="Stil Kodu" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px" &gt;
     &lt;ItemTemplate&gt;
  
       &lt;asp:TextBox CssClass="stilKodu IsRequired" runat="server" ID="txt_StilKodu" Width="80px"  Font-Size="11px"/&gt;
    &lt;/ItemTemplate&gt;
  
    &lt;/asp:TemplateField&gt;
  
   &lt;asp:TemplateField HeaderText="Açıklama" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="120px"  &gt;
   &lt;ItemTemplate&gt;
  
      &lt;asp:TextBox CssClass="aciklama IsRequired" runat="server" ID="txt_Aciklamasi" Width="120px"  Font-Size="11px"/&gt;
      &lt;/ItemTemplate&gt;
   &lt;/asp:TemplateField&gt;
  
   &lt;asp:TemplateField HeaderText="F.Büyüklüğü" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="70px"  &gt;
      &lt;ItemTemplate&gt;
  
       &lt;asp:TextBox CssClass="fontBuyuklugu IsNumber" runat="server" ID="txt_FontBuyuklugu" Width="50px" Font-Size="11px" /&gt;
     &lt;/ItemTemplate&gt;
  
    &lt;/asp:TemplateField&gt;
  
    &lt;asp:TemplateField HeaderText="Kalın" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="90px" &gt;
    &lt;ItemTemplate&gt;                                                                          
       &lt;asp:CheckBox CssClass="kalin" ID="chk_Kalin" runat="server" Width="50px" /&gt;
    &lt;/ItemTemplate&gt;
  
    &lt;/asp:TemplateField&gt;
  
    &lt;asp:TemplateField HeaderText="İtalik" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="90px" &gt;
     &lt;ItemTemplate&gt;
  
       &lt;asp:CheckBox CssClass="italik" ID="chk_Italik" runat="server" Width="50px" /&gt;
     &lt;/ItemTemplate&gt;
  
     &lt;/asp:TemplateField&gt;
  
    &lt;asp:TemplateField HeaderText="Alt Çizgi" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="90px" &gt;
     &lt;ItemTemplate&gt;
  
      &lt;asp:CheckBox CssClass="altCizgi" ID="chk_AltCizgi" runat="server" Width="50px"/&gt;
     &lt;/ItemTemplate&gt;
  
     &lt;/asp:TemplateField&gt;
  
    &lt;asp:TemplateField HeaderText="FontRengi" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="40px" &gt;
     &lt;ItemTemplate&gt;
  
      &lt;asp:DropDownList CssClass="fontRengi" runat="server" ID="dp_FontRengi" Width="90px" Font-Size="11px" /&gt;                                                      
     &lt;/ItemTemplate&gt;
  
     &lt;/asp:TemplateField&gt;
  
     &lt;asp:TemplateField HeaderText="Arka Plan Rengi" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="40px" &gt;
      &lt;ItemTemplate&gt;
  
      &lt;asp:DropDownList CssClass="arkaPlanRengi" runat="server" ID="dp_ArkaPlanRengi" Width="90px" Font-Size="11px" /&gt;                                                      
      &lt;/ItemTemplate&gt;
  
      &lt;/asp:TemplateField&gt;
  
      &lt;asp:TemplateField HeaderText="Gelişmiş" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100%" &gt;
       &lt;ItemTemplate&gt;                                                                          
          &lt;asp:TextBox CssClass="gelismis" runat="server" ID="txt_Gelismis" Width="395px"/&gt;
       &lt;/ItemTemplate&gt;
  
    &lt;/asp:TemplateField&gt;
  
        &lt;/Columns&gt;
       &lt;/cc1:xGrid&gt;
      &lt;/td&gt;
      &lt;/tr&gt;
      &lt;/div&gt;
      &lt;/td&gt;
      &lt;/tr&gt;
      &lt;/table&gt;
      &lt;/td&gt;
      &lt;/tr&gt;
     &lt;/table&gt;
    &lt;/asp:Content&gt;
  </code></pre>