Binding
-
Why has Binding never caught on in Windows Forms. I have been using binding in Wpf for years. Have not paid much attention to Windows Forms. Someone just pointed out that Windows Forms has binding. Looking it up they have had it since .Net2. Occasionally I have had to maintain a Windows Forms app and have never seen it used.
So many years of programming I have forgotten more languages than I know.
-
Why has Binding never caught on in Windows Forms. I have been using binding in Wpf for years. Have not paid much attention to Windows Forms. Someone just pointed out that Windows Forms has binding. Looking it up they have had it since .Net2. Occasionally I have had to maintain a Windows Forms app and have never seen it used.
So many years of programming I have forgotten more languages than I know.
-
Why has Binding never caught on in Windows Forms. I have been using binding in Wpf for years. Have not paid much attention to Windows Forms. Someone just pointed out that Windows Forms has binding. Looking it up they have had it since .Net2. Occasionally I have had to maintain a Windows Forms app and have never seen it used.
So many years of programming I have forgotten more languages than I know.
If one never leaves the Designer, and believes all the "no code behind", then one never learns about Windows Forms binding, etc. It's when you start writing your own framework(s) and patterns that all this starts to come to the surface. For some, that is a bad thing ("details").
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
-
Why has Binding never caught on in Windows Forms. I have been using binding in Wpf for years. Have not paid much attention to Windows Forms. Someone just pointed out that Windows Forms has binding. Looking it up they have had it since .Net2. Occasionally I have had to maintain a Windows Forms app and have never seen it used.
So many years of programming I have forgotten more languages than I know.
Binding is Good(Less coding) and Bad(more code to control) If you want full control on your form workflow, don't use binding If you bind a control (textbox) to datasource (access or mssql) to field ID (AutoNumber) and you want to add new record, the textbox will display -1 (you have more coding to prevent it) sometimes you will not be able to leave textbox binded to numberic (int,dec) empty (blank), unless you enter a value (you have more coding to allow it) binding is powerful and easy if used with dataset, but not easy if used with LinqToSql or EF In my form, I use binding and manual where necessary.
-
Binding is Good(Less coding) and Bad(more code to control) If you want full control on your form workflow, don't use binding If you bind a control (textbox) to datasource (access or mssql) to field ID (AutoNumber) and you want to add new record, the textbox will display -1 (you have more coding to prevent it) sometimes you will not be able to leave textbox binded to numberic (int,dec) empty (blank), unless you enter a value (you have more coding to allow it) binding is powerful and easy if used with dataset, but not easy if used with LinqToSql or EF In my form, I use binding and manual where necessary.
Samir Ibrahim wrote:
If you bind a control (textbox) to datasource (access or mssql) to field ID (AutoNumber) and you want to add new record, the textbox will display -1 (you have more coding to prevent it)
Never show the autoId to a user. If you need an ID for the user, add a column for it, but don't use the PK. Binding is cheap.
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
-
Binding is Good(Less coding) and Bad(more code to control) If you want full control on your form workflow, don't use binding If you bind a control (textbox) to datasource (access or mssql) to field ID (AutoNumber) and you want to add new record, the textbox will display -1 (you have more coding to prevent it) sometimes you will not be able to leave textbox binded to numberic (int,dec) empty (blank), unless you enter a value (you have more coding to allow it) binding is powerful and easy if used with dataset, but not easy if used with LinqToSql or EF In my form, I use binding and manual where necessary.
-
Binding is Good(Less coding) and Bad(more code to control) If you want full control on your form workflow, don't use binding If you bind a control (textbox) to datasource (access or mssql) to field ID (AutoNumber) and you want to add new record, the textbox will display -1 (you have more coding to prevent it) sometimes you will not be able to leave textbox binded to numberic (int,dec) empty (blank), unless you enter a value (you have more coding to allow it) binding is powerful and easy if used with dataset, but not easy if used with LinqToSql or EF In my form, I use binding and manual where necessary.
Samir Ibrahim wrote:
you have more coding to prevent it
Perhaps this is the reason why one CANNOT access the DESCRIPTION field; there is no code to prevent anything (thank-you MS). Example: How to set DESCRIPTION field in system catalog using code[^]
-
I've come to realize there's no point in binding the autonumber/PK because, at most, it's only used for display. It's not something the user can edit. I display it in a label, using "New" when it's -1.
>>at most, it's only used for display. It's not something the user can edit. I display it in a label It can be used for entering a number to search for, so I don't bind the PK to a textbox, I handle it manually.
-
Samir Ibrahim wrote:
If you bind a control (textbox) to datasource (access or mssql) to field ID (AutoNumber) and you want to add new record, the textbox will display -1 (you have more coding to prevent it)
Never show the autoId to a user. If you need an ID for the user, add a column for it, but don't use the PK. Binding is cheap.
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
>> add a column for it, but don't use the PK. That will require creating another table to handle the numbering for your application plus coding to handle the incremented value in that column, well, simply, I don't bind the PK, I handle it manually.