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é
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top