A small example of ASP. NET Datagridview auto wrap

  • 2020-06-19 10:07:50
  • OfStack


protected void AxGridView1_RowDataBound(object sender, GridViewRowEventArgs e) 
   { 
       // Sets that no newlines are allowed for all columns  
       //AxGridView1.Attributes.Add("style", "word-break:keep-all;word-wrap:false"); 
       // Set all columns to wrap automatically  
       AxGridView1.Attributes.Add("style", "word-break:break-all;word-wrap:break-word"); 
   } 

Related articles: