datacontrol and controls


in a Visual Basic environment some control such as text box, combo box, MsFlexGrid contol , etc, can be associated to a datacontrol… can xojo datacontrol be associated to a text box in the same mode as MS VisualBasic?

It is highly reccommended that you design your projects without the Datacontrol, and without using Databinding to controls…
Personally (and I think others will agree), those were never good things to begin with. Use “real” SQL instead.

I redisigned my own datacontrol using controlcontainers
that way I can use it ( and extend it) the way I want …
the integrated datacontrol is too limited I agree with Dave.

but the integrated datacontrol can be used for very simple interface.

ok but whai is the function of the xojo datacontrol? Is it similat to the MS Datacontrol or not?

Yes it is similar to the old antique MS Datacontrol

ok but how can i to connect the controls to the datacontrol?

that is called binding, and as mentioned above… it too is discouraged…
and Xojo did ship with full documentation, some of which explains this control
but I know for a fact very few people really use it, and many that do may not wish to admit it ( just kidding)

ok thank you but why it is discouraged? Do It generate error during use? or it is malfunction?

They aren’t very flexible and the few lines of code it saves you simply aren’t worth it.

For instance if you bind you data to a listbox you can no longer use the header rows of the listbox to sort columns.

And that kind of penalty simply isn’t worth the little bit of work it saves you

ok thank you

depending on what it is you’re trying to achieve you might look at ActiveRecord
it makes dealing with a database a lot simpler & then moving data into UI controls and back into the DB can be a lot less work