I've been playing around trying to bind textbox controls and datagrids
to typed datasets. Up until recently, I never used DataBindings. I
always manually wrote the value into a textbox and stored its value
after the textbox lost focus or whenever someone manually saved the
record. I came to the conclusion after a long time and after many apps
have been developed that there had to be a better way. What I thought
would have been great is simply create a typed dataset, use the IDE to
connect to the fields at design time and voila - instant binding. This
does work fine for very simple situations where there is a clear
parent-child relationship and controls are generally textboxes,
listboxes or even comboboxes. But reality started to sink in when my
dataset started becoming far more complex with many-to-many
relationships, complex relationships and what-have-you. What initially
started out as drag-drop, wizards and
"select-what's-available-in-the-property-window" started to require
coding enhancements such as BindingContext, CurrencyManager , DataViews,
and so on. After a while, I stood back and looked at the mess and began
seriously questioning what the point of it all was. I was trying to
avoid manually coding the databindings, updates, inserts, deletes, etc.
but I began to see almost as much code invested in getting automatic
binding to work. So the question is - it it really worth it? What do I
really gain? Has anyone done application development both ways to make
a comment? Any alternative suggestions?
Thanks
Johann Blake 2 1911
Johann,
Sorry you get a question back on your question. After a while, I stood back and looked at the mess and began seriously questioning what the point of it all was. I was trying to avoid manually coding the databindings, updates, inserts, deletes, etc. but I began to see almost as much code invested in getting automatic binding to work. So the question is - it it really worth it? What do I really gain?
Can you without databinding get the results withouth code?
I don't believe it.
Adding/updating orderrows to an order from a client and that withouth any
code and with complete concurrency error checking.
However, if you have that, please show us how.
Cor
Johann,
I can say I've done it the other way, not in .NET, but with other
technologies which aren't half as gracious as .NET is when it comes to data
binding.
I think something you said kind of indicated part of the problem. You
said that your data set was becoming far more complex (with many-to-many and
complex relationships, although I don't know what you mean by "complex
relationships") .
If it is becoming more complex, perhaps a design review is in order.
It's not the databinding layer's fault if the underlying data is
uber-complicated.
This isn't saying that something is wrong with what you are doing, and I
will admit the data binding story isn't perfect, but I think it is a lot
better than the alternative. The fact that it is baked into every control
as well is a huge plus.
Something I've found is that while you can't change your back-end data
source, it doesn't mean that you have to use the structure as-is. I find
that changing the structure of the intermediary layer (the data set that
will hold the information) can reap big benefits.
Finally, is there a specific issue that you are having a problem with?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Johann Blake" <jo*********@ya hoo.com> wrote in message
news:11******** *************@g 49g2000cwa.goog legroups.com... I've been playing around trying to bind textbox controls and datagrids to typed datasets. Up until recently, I never used DataBindings. I always manually wrote the value into a textbox and stored its value after the textbox lost focus or whenever someone manually saved the record. I came to the conclusion after a long time and after many apps have been developed that there had to be a better way. What I thought would have been great is simply create a typed dataset, use the IDE to connect to the fields at design time and voila - instant binding. This does work fine for very simple situations where there is a clear parent-child relationship and controls are generally textboxes, listboxes or even comboboxes. But reality started to sink in when my dataset started becoming far more complex with many-to-many relationships, complex relationships and what-have-you. What initially started out as drag-drop, wizards and "select-what's-available-in-the-property-window" started to require coding enhancements such as BindingContext, CurrencyManager , DataViews, and so on. After a while, I stood back and looked at the mess and began seriously questioning what the point of it all was. I was trying to avoid manually coding the databindings, updates, inserts, deletes, etc. but I began to see almost as much code invested in getting automatic binding to work. So the question is - it it really worth it? What do I really gain? Has anyone done application development both ways to make a comment? Any alternative suggestions?
Thanks Johann Blake This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tim Jarvis |
last post by:
Hi,
I have an object that I am binding to a text box, this object exposes a
boolean field, and I have implemented a format event handler and a
parse event handler for the binding object, where I convert the bool
value to some meaningful text.
i.e.
Binding b = new
|
by: Kevin |
last post by:
Hi Al
When I have a text box, list box, and a datagrid, how does a CurrencyManager relate to all these controls(seeing as though the datagrid uses Complex binding and textbox and list box use simple bound. So for example if I have a text box, list box and a Datagrid on a windows form, and I want to navigate the records in a dataset(and we must not forget the child records from the child tables aswell!) How do I create the CurrencyManager to...
|
by: Pete Davis |
last post by:
I have written a custom databound grid control that we've been using
successfully for months, but one of our developers has just run into a
problem that I can't figure out.
The code for setting it up is as follows:
DataSet dataSet = new DataSet( "TestSet" );
DataTable tableParent = dataSet.Tables.Add( "TableParent" );
tableParent.Columns.Add( "ID", typeof( Int32 ) );
|
by: D |
last post by:
hi
I have a form with 2 datagrids showing related table data in a master /
child or order / order details type relationship. I would like to auto
select the row in the order details table which contains the highest priced
item. My thoughts were to get the currency manager from the orderdetails
table and iterate thru each row and keep track of the highest item and row
and select that when done. I have found that for some reason the...
|
by: Mr Newbie |
last post by:
Ive got the basic idea behind DataBinding Expressions, but I have a couple
of questions, Ok its four actually :)
Q1.) It would appear that if you use Page.DataBind that all child controls
and the page get bound to their respective DataSources, is this correct ?
and if so why would you need to individually bind controls, why not jsut use
Page.DataBind everytime?, Im sure there is a good reason why not but I cant
think of one at the...
| |
by: Johnny Liner |
last post by:
Hello...
I am creating a CurrencyManager object and setting it like this ...
Code:
Dim cm as CurrencyManager
(...)
'On Open event of form
cm = Me.BindingContext(ds,"tblPersonData")
|
by: Dennis |
last post by:
I have tried using Databinding for my application but always seem to find it
very restrictive (maybe I don't completely understand it enough). I always
seem to find it much easier to display a form, have the user fill it out then
put the data into a class representing a data row and then use the OLEadaptor
or OLECommands to update the database.
My question is has anyone really used databinding in anything but the
simpliest application...
|
by: Brian Richardson |
last post by:
Hi,
Please can anyone kindly offer some suggestions as to why the
CurrencyManager might not refresh.
I am using the CurrencyManager to navigate through a DataView. I am aware
that there is an issue when adding a new record with using bound CheckBoxes
('http://support.microsoft.com/default.aspx?scid=kb;en-us;326440'). Due to
this problem, I have decided to drop the DataBindings from my controls, clear
the values, and attempt to...
|
by: Rich |
last post by:
Hello,
Following an example at
http://www.vb-tips.com/dbpages.aspx?IA=DG (by Cor Lightert and Ken Tucker)
on binding a dataRelation to a Datagridview for sqlClient, I was able to
view rows in datagridview2 that corresponded to a selected row in
datagridview1. Great article/example.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |