BindingContext with NonTypedDataSet - How?

Ö

Özden Irmak

Hello,

I try to write a dataentry screen and as a storage I use a standalone
Non-Typed DataSet where I save and load my data into a XML file...

It seems that via the BindingContext I can't reach to the DataTable in my
DataSet...When I put a DataGrid onto the form and bind it to my DataTable
everything is fine I can add, delete, browse through the data via
DataGrid...But I don't want to use a DataGrid instead want to use my binded
textboxes, etc. for editing...

I even can't do a position change and using the same codes which
DataFormWizard generates in VB.Net (By making the proper changes with
pointing my DataSet and DataTable)...

Can anyone help me or provide me a sample on how to achieve this?

Thanks in advance...

Özden Irmak
 
C

Cor

Hi Ozden

textbox1.DataBindings.Add(New Binding("Text", ds.Tables(0), "MyField"))

And do not forget to place before the update

DirectCast(BindingContext(ds.Tables(0)), CurrencyManager).EndCurrentEdit()

I hope this helps?

Cor
 
Ö

Özden Irmak

Hello Cor,

I'll try this but isn't it enough the binding that I do for a textbox from
Design-Time Properties?

When I use DataGrid as I explained, where also the textboxes binded through
designtime properties, I see that textboxes are working and reflecting the
changes I made through datagrid?

Thanks again...

Özden
 

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

Top