Formatting TextBox Data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • obrienkev
    New Member
    • May 2007
    • 63

    #16
    get error from VS2005 saying that DataGridRow is inaccessible due to its protection level??

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #17
      Originally posted by obrienkev
      get error from VS2005 saying that DataGridRow is inaccessible due to its protection level??
      Oops, DataGridViewRow not DataGridRow, but come on, try and do a little of your own leg work.

      Comment

      • obrienkev
        New Member
        • May 2007
        • 63

        #18
        I've been trying to get the below working...
        Code:
                    DataGridViewColumn dc = dataGridView1.Columns[9];
                    string mytext = "";
                    foreach (DataGridViewRow dr in dataGridView1.Rows)
                    {
                        mytext = dr.Cells[dc.Index].Value.ToString();
                        //you may also chose to have a "<br/>" appended to the end of each row's item here
                    }
                    string myform = mytext.Replace(Environment.NewLine, "<br />");
        where do I use the string myform?

        thanks.

        Comment

        • obrienkev
          New Member
          • May 2007
          • 63

          #19
          changed WrapMode in DefaultCellStyl e to "True"
          and AutoSizeResMode in DataGridView Properties to "All Cells"

          This seems to work.

          Thanks.

          Comment

          Working...