Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在WebGrid中限制html表的行高_Html_Css_Asp.net Mvc_Asp.net Mvc 4_Webgrid - Fatal编程技术网

如何在WebGrid中限制html表的行高

如何在WebGrid中限制html表的行高,html,css,asp.net-mvc,asp.net-mvc-4,webgrid,Html,Css,Asp.net Mvc,Asp.net Mvc 4,Webgrid,html表格一列包含大量文本,表格看起来很难看,行与行之间的空间太大。 如何使表格更好,这样就不会有太多的空间,长列应该更宽,可能有些内容不可见 我尝试使用“最大高度”,但被忽略。 表由ASP.NET MVC4 WebGrid根据动态数据自动生成。如何强制WebGrid 行与行之间无大间距渲染 视图: @继承ViewBase @使用System.Web.Helpers @{Layout=null; var gd=new WebGrid(来源:Model.Rows,canSort:false);

html表格一列包含大量文本,表格看起来很难看,行与行之间的空间太大。 如何使表格更好,这样就不会有太多的空间,长列应该更宽,可能有些内容不可见

我尝试使用“最大高度”,但被忽略。 表由ASP.NET MVC4 WebGrid根据动态数据自动生成。如何强制WebGrid 行与行之间无大间距渲染

视图:

@继承ViewBase
@使用System.Web.Helpers
@{Layout=null;
var gd=new WebGrid(来源:Model.Rows,canSort:false);
}
tr{
最大高度:50px;
}
@gd.GetHtml()
视图模型:

public class ReportDataViewModel : ViewModelBase
{
        public IEnumerable<dynamic> Rows { get; set; }
}
公共类ReportDataViewModel:ViewModelBase { 公共IEnumerable行{get;set;} } 结果:

<!DOCTYPE html>
<html>
<head>
  <title></title>
  <style type="text/css">

    tr {
     max-height :50px;

    }
  </style>
</head>
<body>
      <table>
    <thead>
        <tr>
            <th scope="col">
calculrow            </th>
            <th scope="col">
doktyyp            </th>
            <th scope="col">
dokumnr            </th>
            <th scope="col">
fifoexpens            </th>
            <th scope="col">
hind            </th>
            <th scope="col">
klass            </th>
            <th scope="col">
kogpak            </th>
            <th scope="col">
kogus            </th>
            <th scope="col">
koopia            </th>
            <th scope="col">
nimetus            </th>
            <th scope="col">
paritoluri            </th>
            <th scope="col">
prepayment            </th>
            <th scope="col">
toode            </th>
            <th scope="col">
vat            </th>
            <th scope="col">
dokarvekonto            </th>
            <th scope="col">
dokeimuuda            </th>
            <th scope="col">
dokkrdokumnr            </th>
            <th scope="col">
dokkuupaev            </th>
            <th scope="col">
dokraha            </th>
            <th scope="col">
doksaaja            </th>
            <th scope="col">
doktasudok            </th>
            <th scope="col">
doktasukuup            </th>
            <th scope="col">
doktekst1            </th>
            <th scope="col">
klientaadress            </th>
            <th scope="col">
klientnimi            </th>
            <th scope="col">
klientotsekorral            </th>
            <th scope="col">
klientpiirkond            </th>
            <th scope="col">
klientpostiindek            </th>
            <th scope="col">
klienttanav            </th>
            <th scope="col">
klientviitenr            </th>
            <th scope="col">
kreeditdoktasudok            </th>
            <th scope="col">
maksetintingimus            </th>
            <th scope="col">
myygikookmprotsent            </th>
            <th scope="col">
myygikoomaksuvaba            </th>
            <th scope="col">
saajanimi            </th>
            <th scope="col">
saajapiirkond            </th>
            <th scope="col">
saajapostiindek            </th>
            <th scope="col">
saajatanav            </th>
            <th scope="col">
toodekaubakood            </th>
            <th scope="col">
toodeklass            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>False</td>
            <td>G</td>
            <td>2045</td>
            <td>False</td>
            <td>362,28813</td>
            <td>T</td>
            <td>0,0000</td>
            <td>2,0000</td>
            <td>1</td>
            <td>Siduri- ja piduriheebel kinnitustega              </td>
            <td></td>
            <td>0</td>
            <td>32-30100            </td>
            <td>1775,61</td>
            <td>112       </td>
            <td>False</td>
            <td>0</td>
            <td>27.11.2013 0:00:00</td>
            <td>EUR</td>
            <td></td>
            <td>359                      </td>
            <td>7.12.2013 0:00:00</td>
            <td>Arve 988 26.01.2012
Arve  16.08.2012
Arve 290 16.08.2012
Muu sissetulnud 24
Muu sissetulnud 25 2
Kassa sissetulek 8 4
Tellimus 43 05.01.2012
Tellimus 46 24.12.2011
Arve 292 10.01.2013
V&#228;ljastus 17.05.2013
Arve 344 27.09.2013
Arve 344 27.09.2013
Arve 05.11.2013
Tellimus 47 09.08.2013
Arve 20.12.2013</td>
            <td></td>
            <td>Acura UAB                                                                       </td>
            <td>767       </td>
            <td>                              </td>
            <td>          </td>
            <td>Huan Uh 2                                                   </td>
            <td>23445456            </td>
            <td></td>
            <td>10 p&#228;eva, viivis 0.5% p&#228;evas                      </td>
            <td>20,00</td>
            <td>False</td>
            <td>Acura UAB                                                                       </td>
            <td>                              </td>
            <td>          </td>
            <td>Huan Uh 2                                                   </td>
            <td></td>
            <td>     </td>
        </tr>
        <tr>
            <td>False</td>
            <td>G</td>
            <td>2045</td>
            <td>False</td>
            <td>0,43700</td>
            <td>T</td>
            <td>0,0000</td>
            <td>0,0000</td>
            <td>1</td>
            <td>Balti v&#252;rtsikilud 270g                            </td>
            <td></td>
            <td>0</td>
            <td>0075                </td>
            <td>1775,61</td>
            <td>112       </td>
            <td>False</td>
            <td>0</td>
            <td>27.11.2013 0:00:00</td>
            <td>EUR</td>
            <td></td>
            <td>359                      </td>
            <td>7.12.2013 0:00:00</td>
            <td>Arve 988 26.01.2012
Arve  16.08.2012
Arve 290 16.08.2012
Muu sissetulnud 24
Muu sissetulnud 25 2
Kassa sissetulek 8 4
Tellimus 43 05.01.2012
Tellimus 46 24.12.2011
Arve 292 10.01.2013
V&#228;ljastus 17.05.2013
Arve 344 27.09.2013
Arve 344 27.09.2013
Arve 05.11.2013
Tellimus 47 09.08.2013
Arve 20.12.2013</td>
            <td></td>
            <td>Acura UAB                                                                       </td>
            <td>767       </td>
            <td>                              </td>
            <td>          </td>
            <td>Huan Uh 2                                                   </td>
            <td>23445456            </td>
            <td></td>
            <td>10 p&#228;eva, viivis 0.5% p&#228;evas                      </td>
            <td>20,00</td>
            <td>False</td>
            <td>Acura UAB                                                                       </td>
            <td>                              </td>
            <td>          </td>
            <td>Huan Uh 2                                                   </td>
            <td></td>
            <td>     </td>
        </tr>
    </tbody>
    </table>

</body>
</html>

tr{
最大高度:50px;
}
计算流
doktyyp
杜库姆
五次曝光
后面的
克拉斯
科帕克
科格斯
库皮亚
尼美图斯
帕里托鲁里
预付款
图德
增值税
多卡维科托
Dokeimouda
多克多库姆纳
多库帕耶夫
多克拉哈
多克萨亚
多克塔索克
多克塔苏库普
doktekst1
克利恩塔服饰
克利恩尼米
克林特塞科拉尔
克利恩皮尔科德
克利恩波斯蒂因德
克利恩塔纳夫
克林特维特
kreeditdoktasudok
马克塞丁丁丁尼马斯
Myygikookprotsen
myygikoomaksuvaba
萨贾尼米
萨贾皮尔康德
萨贾波斯蒂克
萨贾塔纳夫
图德考巴库德
图德克拉斯
错误的
G
2045
错误的
362,28813
T
0,0000
2,0000
1.
Siduri-ja piduriheebel kinnitustega
0
32-30100            
1775,61
112
错误的
0
27.11.2013 0:00:00
欧元
359
7.12.2013 0:00:00
Arve 988 26.01.2012
Arve 16.08.2012
Arve 290 16.08.2012
Muu sissetulnud 24
Muu sissetulnud 25 2
Kassa sissetulek 8 4
Tellimus 43 05.01.2012
Tellimus 46 24.12.2011
Arve 292 10.01.2013
V&228;ljastus 17.05.2013
Arve 344 27.09.2013
Arve 344 27.09.2013
Arve 05.11.2013
Tellimus 47 09.08.2013
Arve 20.12.2013
Acura UAB
767
焕宇2
23445456
10便士ä英镑;eva,viivis 0.5%p&228;埃瓦斯
20,00
错误的
Acura UAB
焕宇2
错误的
G
2045
错误的
0,43700
T
0,0000
0,0000
1.
巴尔的海五世ü;rtsikilud 270g
0
0075
1775,61
112
错误的
0
27.11.2013 0:00:00
欧元
359
7.12.2013 0:00:00
Arve 988 26.01.2012
Arve 16.08.2012
Arve 290 16.08.2012
Muu sissetulnud 24
Muu sissetulnud 25 2
Kassa sissetulek 8 4
Tellimus 43 05.01.2012
Tellimus 46 24.12.2011
Arve 292 10.01.2013
V&228;ljastus 17.05.2013
Arve 344 27.09.2013
Arve 344 27.09.2013
Arve 05.11.2013
Tellimus 47 09.08.2013
Arve 20.12.2013
Acura UAB
767
焕宇2
23445456
10便士ä英镑;eva,viivis 0.5%p&228;埃瓦斯
20,00
错误的
Acura UAB
焕宇2
更新

已尝试此操作,但输出未定义:

<!DOCTYPE html>
<html>
<head>
  <title></title>
  <style type="text/css">
    .td-max-height {
      margin: 0px;
      height: 50px;
      max-height: 50px;
      width: 100%;
      overflow: auto;
    }
 </style>
  <script src="/Scripts/jquery/jquery-1.9.1.js"></script>
<script src="/Scripts/jquery-ui-1.9.2.custom.js"></script>
<script src="/Scripts/i18n/jquery.ui.datepicker-et.js"></script>
<script src="/Scripts/jquery.contextmenu-fixed2.js"></script>
script src="/Scripts/json2.js"></script>
<script src="/Scripts/jquery.form.js"></script>
 <script>
    $(function () {
      $("tr td").wrapInner(function (index, text) {
        return "<div class='td-max-height'>" + text + "</div>";
      });
    });
  </script>
</head>
<body>
      <table>
    <thead>
        <tr>
            <th scope="col">
calculrow            </th>
            <th scope="col">
doktyyp            </th>
            <th scope="col">
dokumnr            </th>
            <th scope="col">
fifoexpens            </th>
            <th scope="col">
hind            </th>
            <th scope="col">
klass            </th>
            <th scope="col">
kogpak            </th>
            <th scope="col">
kogus            </th>
            <th scope="col">
koopia            </th>
            <th scope="col">
nimetus            </th>
            <th scope="col">
paritoluri            </th>
            <th scope="col">
prepayment            </th>
            <th scope="col">
toode            </th>
            <th scope="col">
vat            </th>
            <th scope="col">
dokarvekonto            </th>
            <th scope="col">
dokeimuuda            </th>
            <th scope="col">
dokkrdokumnr            </th>
            <th scope="col">
dokkuupaev            </th>
            <th scope="col">
dokraha            </th>
            <th scope="col">
doksaaja            </th>
            <th scope="col">
doktasudok            </th>
            <th scope="col">
doktasukuup            </th>
            <th scope="col">
doktekst1            </th>
            <th scope="col">
klientaadress            </th>
            <th scope="col">
klientnimi            </th>
            <th scope="col">
klientotsekorral            </th>
            <th scope="col">
klientpiirkond            </th>
            <th scope="col">
klientpostiindek            </th>
            <th scope="col">
klienttanav            </th>
            <th scope="col">
klientviitenr            </th>
            <th scope="col">
kreeditdoktasudok            </th>
            <th scope="col">
maksetintingimus            </th>
            <th scope="col">
myygikookmprotsent            </th>
            <th scope="col">
myygikoomaksuvaba            </th>
            <th scope="col">
saajanimi            </th>
            <th scope="col">
saajapiirkond            </th>
            <th scope="col">
saajapostiindek            </th>
            <th scope="col">
saajatanav            </th>
            <th scope="col">
toodekaubakood            </th>
            <th scope="col">
toodeklass            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>False</td>
            <td>G</td>
            <td>135534</td>
            <td>False</td>
            <td>197,91000</td>
            <td>T</td>
            <td>0,0000</td>
            <td>0,0000</td>
            <td>1</td>
            <td>ARLANDA               </td>
            <td></td>
            <td>0</td>
            <td></td>
            <td>0</td>
            <td></td>
            <td>False</td>
            <td>0</td>
            <td>19.01.2014 0:00:00</td>
            <td>SEK</td>
            <td></td>
            <td></td>
            <td></td>
            <td>test                       </td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td>0</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
   </tbody>
    </table>
</body>
</html>

.td最大高度{
边际:0px;
高度:50px;
最大高度:50px;
宽度:100%;
溢出:自动;
}
script src=“/Scripts/json2.js”>
$(函数(){
$(“tr td”).wrapInner(函数(索引,文本){
返回“+text+”;
});
});
计算流
doktyyp
杜库姆
五次曝光
后面的
<!DOCTYPE html>
<html>
<head>
  <title></title>
  <style type="text/css">
    .td-max-height {
      margin: 0px;
      height: 50px;
      max-height: 50px;
      width: 100%;
      overflow: auto;
    }
 </style>
  <script src="/Scripts/jquery/jquery-1.9.1.js"></script>
<script src="/Scripts/jquery-ui-1.9.2.custom.js"></script>
<script src="/Scripts/i18n/jquery.ui.datepicker-et.js"></script>
<script src="/Scripts/jquery.contextmenu-fixed2.js"></script>
script src="/Scripts/json2.js"></script>
<script src="/Scripts/jquery.form.js"></script>
 <script>
    $(function () {
      $("tr td").wrapInner(function (index, text) {
        return "<div class='td-max-height'>" + text + "</div>";
      });
    });
  </script>
</head>
<body>
      <table>
    <thead>
        <tr>
            <th scope="col">
calculrow            </th>
            <th scope="col">
doktyyp            </th>
            <th scope="col">
dokumnr            </th>
            <th scope="col">
fifoexpens            </th>
            <th scope="col">
hind            </th>
            <th scope="col">
klass            </th>
            <th scope="col">
kogpak            </th>
            <th scope="col">
kogus            </th>
            <th scope="col">
koopia            </th>
            <th scope="col">
nimetus            </th>
            <th scope="col">
paritoluri            </th>
            <th scope="col">
prepayment            </th>
            <th scope="col">
toode            </th>
            <th scope="col">
vat            </th>
            <th scope="col">
dokarvekonto            </th>
            <th scope="col">
dokeimuuda            </th>
            <th scope="col">
dokkrdokumnr            </th>
            <th scope="col">
dokkuupaev            </th>
            <th scope="col">
dokraha            </th>
            <th scope="col">
doksaaja            </th>
            <th scope="col">
doktasudok            </th>
            <th scope="col">
doktasukuup            </th>
            <th scope="col">
doktekst1            </th>
            <th scope="col">
klientaadress            </th>
            <th scope="col">
klientnimi            </th>
            <th scope="col">
klientotsekorral            </th>
            <th scope="col">
klientpiirkond            </th>
            <th scope="col">
klientpostiindek            </th>
            <th scope="col">
klienttanav            </th>
            <th scope="col">
klientviitenr            </th>
            <th scope="col">
kreeditdoktasudok            </th>
            <th scope="col">
maksetintingimus            </th>
            <th scope="col">
myygikookmprotsent            </th>
            <th scope="col">
myygikoomaksuvaba            </th>
            <th scope="col">
saajanimi            </th>
            <th scope="col">
saajapiirkond            </th>
            <th scope="col">
saajapostiindek            </th>
            <th scope="col">
saajatanav            </th>
            <th scope="col">
toodekaubakood            </th>
            <th scope="col">
toodeklass            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>False</td>
            <td>G</td>
            <td>135534</td>
            <td>False</td>
            <td>197,91000</td>
            <td>T</td>
            <td>0,0000</td>
            <td>0,0000</td>
            <td>1</td>
            <td>ARLANDA               </td>
            <td></td>
            <td>0</td>
            <td></td>
            <td>0</td>
            <td></td>
            <td>False</td>
            <td>0</td>
            <td>19.01.2014 0:00:00</td>
            <td>SEK</td>
            <td></td>
            <td></td>
            <td></td>
            <td>test                       </td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td>0</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
   </tbody>
    </table>
</body>
</html>
<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <style type="text/css">

      .withMaximumHeight {
      max-height :50px;
      overflow: hidden;

      }
    </style>
  </head>
  <body>
    <table>
      <thead>
        <tr>
          <th scope="col">
            calculrow
          </th>
          <th scope="col">
            doktyyp
          </th>
          <th scope="col">
            dokumnr
          </th>
          <th scope="col">
            fifoexpens
          </th>
          <th scope="col">
            hind
          </th>
          <th scope="col">
            klass
          </th>
          <th scope="col">
            kogpak
          </th>
          <th scope="col">
            kogus
          </th>
          <th scope="col">
            koopia
          </th>
          <th scope="col">
            nimetus
          </th>
          <th scope="col">
            paritoluri
          </th>
          <th scope="col">
            prepayment
          </th>
          <th scope="col">
            toode
          </th>
          <th scope="col">
            vat
          </th>
          <th scope="col">
            dokarvekonto
          </th>
          <th scope="col">
            dokeimuuda
          </th>
          <th scope="col">
            dokkrdokumnr
          </th>
          <th scope="col">
            dokkuupaev
          </th>
          <th scope="col">
            dokraha
          </th>
          <th scope="col">
            doksaaja
          </th>
          <th scope="col">
            doktasudok
          </th>
          <th scope="col">
            doktasukuup
          </th>
          <th scope="col">
            doktekst1
          </th>
          <th scope="col">
            klientaadress
          </th>
          <th scope="col">
            klientnimi
          </th>
          <th scope="col">
            klientotsekorral
          </th>
          <th scope="col">
            klientpiirkond
          </th>
          <th scope="col">
            klientpostiindek
          </th>
          <th scope="col">
            klienttanav
          </th>
          <th scope="col">
            klientviitenr
          </th>
          <th scope="col">
            kreeditdoktasudok
          </th>
          <th scope="col">
            maksetintingimus
          </th>
          <th scope="col">
            myygikookmprotsent
          </th>
          <th scope="col">
            myygikoomaksuvaba
          </th>
          <th scope="col">
            saajanimi
          </th>
          <th scope="col">
            saajapiirkond
          </th>
          <th scope="col">
            saajapostiindek
          </th>
          <th scope="col">
            saajatanav
          </th>
          <th scope="col">
            toodekaubakood
          </th>
          <th scope="col">
            toodeklass
          </th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>False</td>
          <td>G</td>
          <td>2045</td>
          <td>False</td>
          <td>362,28813</td>
          <td>T</td>
          <td>0,0000</td>
          <td>2,0000</td>
          <td>1</td>
          <td>Siduri- ja piduriheebel kinnitustega              </td>
          <td></td>
          <td>0</td>
          <td>32-30100            </td>
          <td>1775,61</td>
          <td>112       </td>
          <td>False</td>
          <td>0</td>
          <td>27.11.2013 0:00:00</td>
          <td>EUR</td>
          <td></td>
          <td>359                      </td>
          <td>7.12.2013 0:00:00</td>
          <td>
            <div class="withMaximumHeight">
              Arve 988 26.01.2012
              Arve  16.08.2012
              Arve 290 16.08.2012
              Muu sissetulnud 24
              Muu sissetulnud 25 2
              Kassa sissetulek 8 4
              Tellimus 43 05.01.2012
              Tellimus 46 24.12.2011
              Arve 292 10.01.2013
              V&#228;ljastus 17.05.2013
              Arve 344 27.09.2013
              Arve 344 27.09.2013
              Arve 05.11.2013
              Tellimus 47 09.08.2013
              Arve 20.12.2013
            </div>
          </td>
          <td></td>
          <td>Acura UAB                                                                       </td>
          <td>767       </td>
          <td>                              </td>
          <td>          </td>
          <td>Huan Uh 2                                                   </td>
          <td>23445456            </td>
          <td></td>
          <td>10 p&#228;eva, viivis 0.5% p&#228;evas                      </td>
          <td>20,00</td>
          <td>False</td>
          <td>Acura UAB                                                                       </td>
          <td>                              </td>
          <td>          </td>
          <td>Huan Uh 2                                                   </td>
          <td></td>
          <td>     </td>
        </tr>
        <tr>
          <td>False</td>
          <td>G</td>
          <td>2045</td>
          <td>False</td>
          <td>0,43700</td>
          <td>T</td>
          <td>0,0000</td>
          <td>0,0000</td>
          <td>1</td>
          <td>Balti v&#252;rtsikilud 270g                            </td>
          <td></td>
          <td>0</td>
          <td>0075                </td>
          <td>1775,61</td>
          <td>112       </td>
          <td>False</td>
          <td>0</td>
          <td>27.11.2013 0:00:00</td>
          <td>EUR</td>
          <td></td>
          <td>359                      </td>
          <td>7.12.2013 0:00:00</td>
          <td>
            <div class="withMaximumHeight">
              Arve 988 26.01.2012
              Arve  16.08.2012
              Arve 290 16.08.2012
              Muu sissetulnud 24
              Muu sissetulnud 25 2
              Kassa sissetulek 8 4
              Tellimus 43 05.01.2012
              Tellimus 46 24.12.2011
              Arve 292 10.01.2013
              V&#228;ljastus 17.05.2013
              Arve 344 27.09.2013
              Arve 344 27.09.2013
              Arve 05.11.2013
              Tellimus 47 09.08.2013
              Arve 20.12.2013
            </div>
          </td>
          <td></td>
          <td>Acura UAB                                                                       </td>
          <td>767       </td>
          <td>                              </td>
          <td>          </td>
          <td>Huan Uh 2                                                   </td>
          <td>23445456            </td>
          <td></td>
          <td>10 p&#228;eva, viivis 0.5% p&#228;evas                      </td>
          <td>20,00</td>
          <td>False</td>
          <td>Acura UAB                                                                       </td>
          <td>                              </td>
          <td>          </td>
          <td>Huan Uh 2                                                   </td>
          <td></td>
          <td>     </td>
        </tr>
      </tbody>
    </table>

  </body>
</html>
<td>
<div class="foo"> A very large amount of text here </div>
</td>
.foo {
     margin: 0px;
     height: 60px;
     width: 100%;
     min-width: 200px;
     overflow: auto; /* This is if you want the scrollbars. If you want the text to be hidden instead, use 'hidden' */
     }
gd.Column(
   columnName:"ColumnName", 
   format: (item) => 
   {
      return "<div class='td-max-height'>" + item.Context + "</div>";
   }),
.td-max-height {
     margin: 0px;
     height: 50px;
     max-height: 50px;
     width: 100%;
     overflow: auto;
 }
$("tr td").each( function() { 
        $(this).wrapInner("<div class='td-max-height'></div>");
    });