Binding problem

  • Thread starter Thread starter csharpula csharp
  • Start date Start date
C

csharpula csharp

Hello ,
I have a problem with data grid. I bounded an object to data grid in
this way:
dataGridView1.DataSource = objectA.Name

and the binding is working but the problem is that after the binding
happens,I can't add a new row to the grid and I could do it before. Why
is that?

Thanks!
 
Hi,

Without seeing more of your code it is difficult to see what exactly is
wrong. But it seems that you bound the grid to a single string. The grid
would have exactly one row then. If you bind the grid to a collection, such
as for example a List, you will be able to add rows. However, I am afraid
your troubles have only just begun ;-). Binding to a datagrid is complicated.
Try and find some tutorials on the web!

andré
 
Back
Top