About 3,380,000 results
Open links in new tab
  1. Wrap text to the next line when it exceeds a certain length?

    Here's one that is lightly tested and uses LastIndexOf to speed things along (a guess): private static string Wrap(string v, int size) v = v.TrimStart(); if (v.Length <= size) return v; var …

  2. DataGridView with Wrap text in Cell but without newline

    Oct 25, 2023 · In the following code, there are two columns, the second after pasting text into it and leaving text will wrap. dataGridView1.DefaultCellStyle.WrapMode = …

  3. c# - WrapText for column in Excel programmatically - Stack Overflow

    Apr 26, 2014 · { Worksheet.Columns[b].WrapText = true; //Worksheet.Columns[b].AutoFit(); } for (int b = 2; b <= MaxCol + 1; b++) { Worksheet.Columns[b].Font.Size = 7; } …

  4. How to apply the column width along with word wrap

    Oct 1, 2024 · StringBuilder wrappedText = new StringBuilder(); int w_currentIndex = 0; while (w_currentIndex < w_Val.length()) { int endIndex = Math.min(w_currentIndex + 200, …

  5. Table cell widths - fixing width, wrapping/truncating long words

    As long as you fix the width of the table itself and set the table-layout property, this is pretty simple : <style type="text/css"> td { width: 30px; overflow: hidden; } table { width : 90px; table-layout: …

  6. Make column's width fixed and wrap words to next line

    Simply you need to apply table-layout to be fixed: table{ table-layout: fixed; } By default table-layout is auto.

  7. Fix Width Column of Gridview with Word Wrap - Stack Overflow

    Mar 24, 2011 · I need to be able to fix the width of the column and have word wrap take care of the string till the end of it. I have tried all the properties on the gridview to get what I need but …

  8. Display long text in cell : only what fits - no wrap, no font shrink ...

    Dec 24, 2014 · Is it possible to display text in a cell, so that only what fits in the cell width is displayed, without wrapping or font shrinking? This happens automatically if the right cell is not …

  9. Wrap text in a fixed width column - Excel General - OzGrid Free Excel

    Jun 3, 2004 · Columns("D:D").Select With Selection.ColumnWidth = 42.NumberFormat = "General".HorizontalAlignment = xlLeft.VerticalAlignment = xlTop.WrapText = True End With. …

  10. Autofit row with text wrapping in columns - aspose.com

    Feb 18, 2013 · Ms-Excel uses #### to replace the number that can not be displayed. Please set proper column width which could include the integral part length if you use fixed column width.

Refresh