Questions About Data Sources and Binding Controls from GUI

.NET programming topics
Post Reply
Neofriend
Captain
Captain
Posts: 103
Joined: Wed Dec 23, 2009 3:37 pm
Location: Pakistan

Questions About Data Sources and Binding Controls from GUI

Post by Neofriend » Thu Jan 07, 2010 2:28 am

A simple question but confusing as well.

I have a table for example, with 4 columns. Say the table is for user management. If we are adding the user, the person needs to fill 4 text boxes and hit add and the user is added.

I've just done this from code. Am i doing more work than I should?
Just asking as I saw how easily you can drag the details from datasources and it makes up everything for you. With the controls to move next, previous, add, delete and so on...

Now editing the users window, I can simply use it from GUI but I have primary key and foriegn key applied to it. I would like not to edit the first column, and edit others only.

How can we give custom controlling to the piece of code made from GUI? Am not sure if I can explain well but hope you understand.

Should I elaborate? please let me know.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: Questions About Data Sources and Binding Controls from GUI

Post by Neo » Thu Jan 07, 2010 3:03 am

There are several methods to do this as you said and coders use according to their preference. I prefer manual method of entering data to database (using sql) where I get the 100% control to me. Though it is bit time consuming than the other approach, it is easy to handle in the long run.

You can simply lock the box related to primary key (the one you don't like to enter data) and auto generate a number every time you add an entry to database.
Post Reply

Return to “.NET Programming”