Need to know the best and cleanest (most efficent way) to bind data to textboxes or other form controls in C#

Posted on 2012-08-22
Last Modified: 2013-12-14
This is so much simpler in FoxPro. I am trying to develop and understand the best way to edit and save data back to local tables and well as to SQL server (2008) using a form with textboxes, grids, etc.

Thanks again in advance! This will be a big help to me!

Question by:busycoder
    LVL 23

    Expert Comment

    by:Roopesh Reddy
    LVL 41

    Expert Comment

    I cannot say what is the cleanest way because it is still under development.

    If you know FoxPro then you should read:

    VB.NET is also similar to C#, so look also at this book:
    LVL 29

    Accepted Solution

    You should begin on a more abstract and higher level than data binding, actually.
    If you want to see fast results (in regard of development to a runnable form), perhaps take a look at some third party add-ons to VS. For example lately cocktail 1.0 was released by IdeaBlade:

    It's a framework, it doesn't help you learning core DotNet, as it takes away low level tasks like loading and saving data from you, but it gets you faster forward developing an app. It's free and based on DevForce Express by the same company, also free. This just limits you to 10 entities (tables). But that should get you started and get a feeling of how development can be done, when advanced.
    On the other side in parallel, approach DotNet by the book Pavel recommends. It's really nicely bringing you into DotNet step by step. It tells you what things compare to in VFP and what's new. It's outdated, as there is more to learn, but it's not outdated, as the basics still apply and are available and they are the basics to learn anyway. So it gives you a nice basis for learning more.

    I can strongly recommend learning OOP concepts, if you haven't yet familarized with them in VFP already. And on top of that dig into the MVVM design pattern as a specific architecture of application layers for UI (View), application logic (ViewModel) and database/data access layer (Model). It's a concept recommended by MS for DotNet application development. It mainly is seperation of GUI and Data by a middle tier, which is not a new concept for OOP developers, but something you can't get around, as there is no direct binding of controls to table fields anyway, as in VFP.

    The Cocktail framework applies this architecture, and so also in that respect it's good to learn from it.

    Author Closing Comment

    I will dive in here :) thanks again all!!!!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
    Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now