basic .net questions

Hi,
I'm new to .net, and am currently working on a project for class that has me stumped in a number of areas. The project is a simple 4 form /Modmain project, with a login form with password etc. and oleDB connectivity on only 2 of the forms. I have everything working except the last form, which is used to edit one table. Questions are as follows:

1. I have to make the "Gender" combo box offer a choice of "M" or "F" with the user being forced to choose one. Likewise, there is a another combo box that should offer a forced choice of "Y" or "N". I have searched the properties, and can't seem to find the right point. ??

2. When the form first opens, everything should be disabled until the "Edit" button is clicked.

3. The "Edit" button should enable all boxes except student ID enabled.

4. Pressing the "Edit button again should toggle the form back to the way it was when the form first opened, and should save any changes made to the record. (there is no update button on the form, and there is no option to cancel)

5. The user should not be able to close the form when in edit mode.

and last but not least, I need to create a status bar (I have it on the form) that displays the first and last name as the user goes from record to record.

Any peice of this would be a great help- thanks very much.
:-)

Comments

  • [b][red]This message was edited by calyan at 2003-12-13 5:6:14[/red][/b][hr]
    Hi There,
    first u didnt mention the language on vch u r programming in .NET platform.if u had given that i shud've tried to give u the source code for ur requirement.
    to force user to select an element in a combo box, vat we do in our company is as follows.lets take ur xample of M/F. we'll have three elements in the combo box namely in the following order

    Male
    Female

    u can show as the default element (u can make any element in the list as default element by using ComboBox.SelectedIndex = N where N is the index of ur element).
    u validate all these forced selections in OnSave method(OnSave method is the event that fires ) when u click on Save or update.
    u programatically disable the controls using. lemme know if u wud like 2 have c# source code of how to Enable/Disable a control.
    then, toggling between the edit/View Mode on clicking Edit button can be handled by regestering in event for Edit Button clicked and having a flag which alternatively toggles true and false. This flag tells us whether screen is in edit mode or not. based on this flag u can enable/disable controls.

    I hope i answered all ur queries, do lemme know if u r nt clear vth my answers. kalyan_ganjam@semanticspace.com / gscalyan@yahoo.co.in are my email Id's

    Regards,
    Kalyan Ganjam
    www.semanticspace.com




    : Hi,
    : I'm new to .net, and am currently working on a project for class that has me stumped in a number of areas. The project is a simple 4 form /Modmain project, with a login form with password etc. and oleDB connectivity on only 2 of the forms. I have everything working except the last form, which is used to edit one table. Questions are as follows:
    :
    : 1. I have to make the "Gender" combo box offer a choice of "M" or "F" with the user being forced to choose one. Likewise, there is a another combo box that should offer a forced choice of "Y" or "N". I have searched the properties, and can't seem to find the right point. ??
    :
    : 2. When the form first opens, everything should be disabled until the "Edit" button is clicked.
    :
    : 3. The "Edit" button should enable all boxes except student ID enabled.
    :
    : 4. Pressing the "Edit button again should toggle the form back to the way it was when the form first opened, and should save any changes made to the record. (there is no update button on the form, and there is no option to cancel)
    :
    : 5. The user should not be able to close the form when in edit mode.
    :
    : and last but not least, I need to create a status bar (I have it on the form) that displays the first and last name as the user goes from record to record.
    :
    : Any peice of this would be a great help- thanks very much.
    : :-)
    :



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion