DataGridView Panel Column

Answered
0
0

Hi

I was wondering whether it is possible to create a DGV Panel Column, such that the Panel can contain a number of controls?

CF Data Repeater

If so a simple sample would be great

Thanks for your help

Ewan

  • You must to post comments
Good Answer
0
0

By design as the fields are set by code you have to add the new row to the table programmatically

  • You must to post comments
0
0

Hi Kevin

Having tried this approach it works with a data bound DGV until you allow the user to add rows.

Editing the Panel fields feeds the data back to the DGV, however a new row is not created in the associated data table so nothing is saved to the database

 

  • You must to post comments
0
0

Hi Ewan,

You can set like this:

var panel1 = new Panel() { Dock = DockStyle.Fill };
this.dataGridView1[col, row].Control = this.panel1;

You can put anything in panel1, but it is not recommended to do for many cells because creating hundreds of controls slows down the browser and uses memory.

Best,

Kevin (ITG)

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.