0

In Sql Server 2005, In Form Load I write this Code. txtPrprCase is a UserControl and validates First Character to Capital. How to i add this Control to DataGridView. I try the Following Code. But it does not Work.

ciscontrols.txtPrprCase txt = new ciscontrols.txtPrprCase();
        txt.Name = "Customer Name";
        this.dataGridView2.RowCount = 1;
        foreach (DataGridViewRow row in dataGridView2.Rows)
        {
            row.Cells[0].Value = txt;
        }

and the following code works the validation

ciscontrols.txtPrprCase txt = new ciscontrols.txtPrprCase();
this.dataGridView2.Rows.add(txt);

it works but it does not contain column header and row header...

1 Answers1

1

This is going to be perfect for you.

PM_ME_YOUR_CODE
  • 321
  • 1
  • 6