DataSheet Form

  • Thread starter Thread starter Bernard Bourée
  • Start date Start date
B

Bernard Bourée

I'm coding a complex physical problem which request the input and ouput of a
lot of datas.
In order to do that I have started to bulid a form which contains a lot of
Label and TextBox ,
but this is very heavy and difficult to manage.
I also thought in using a data grid but didn't found it easier.

Is there any easier way to achieve that ?
 
Bernard,

Answering your other question I got this idea.
You can use the classes as you asked about.

However you can as well use a datatable together with a datagrid, that gives
you a very easy approach.

A datatable you is easy to build as this (all typed in this message so watch
typos)

\\\needs a datagrid on a form
dim dt as new datatable
dt.columns.add("Id")
dt.columns.add("MyValueRow1")
dt.columns.add("MyValueRow2")
dt.rows.add(dt.newrow)
dim dr as datarow = dt.rows(0)
dr("Id") = "One"
dr("MyValueRow1") = "Whatevervalue"
dr("MyValueRow2") = "AnotherValue)
datagrid1.datasource = dt
///

This gives a datagrid with one row.

And than you can make thousand of rows in loops, using dataviews or all
other posibilities from AdoNet even when it is not connected to a database.
When you add this table to a dataset which is very easy to do by just
ds.add(dt) you can save it just by ds.writeXml("path") and read it as well.

I hope this helps something?

Cor
 

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