hey
im using vc++ clr to build my application...im using the datagridview, but im having some problems with it because its quite poorly documented in C++..i want to know a couple of things.

1... how to change the color and text of a single row header cell as well as the text in the row header cell.

2... how to change the standard column width..

thanks in advance :)

Here are some things to contemplate:

private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e)
   {
      dataGridView1->Columns->Add("asdf", "myASDF");

      // set the column width
      dataGridView1->Columns[0]->Width = 444;

      // Add some rows
      for (int i = 0; i < 3; i++)
      {
         dataGridView1->Rows->Add();
         dataGridView1->Rows[i]->Cells[0]->Value = "adsf " + i.ToString();
      }

      // Change the header text color
      dataGridView1->Columns[0]->HeaderCell->Style->ForeColor = Color::Green;

      // Change a cell's text color
      dataGridView1->Rows[1]->Cells[0]->Style->ForeColor = Color::Red;
   }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.