User maintains a checklist of client's daily activities like gettingup, houser chores etc, for each activity, rating is done (5,4,3,2,1). This rating is done every week. Now how do I get this as input from the user. Right now , week no is manually entered in a sheet (1,2,3,4,5). What could be the best way to get this type of input from the user
So you just want to know what is the best way for the user to enter a choice of 1-2-3-4 or 5?
5 radio buttons.
A numericUpDown with limits of 1-5.
A combinationlist with values of 1-5.
No. I want to know what is the way to get week no from the user.
I can get the date easily, but the user maintains only week numbers
so what I did is this, Year, month and week numbers separately from the users
and again I should not allow the user to enter for future weeks
Hope you understand now
If you are going to allow past weeks, but not allow future weeks, then provide a numericUpDown with an upper limit of the current week - which you can get from the WeekOfYear method.
I have year in a text box, months in combo and 1-5 weeks in another combo
So now the fields are Year, Month and Week number. If user selects 5th week number for a month which has only 4 weeks, I display them appropriate message. Now my problem is, no where I get the date from the user, instead I get week number. Now how do I restrict user from entering for Future week
Ex: The user is allowed to rate only till 2009 November 4th week not for 5th week. How do I validate this?. This would be still clear
If user selects 5th week number for a month which has only 4 weeks, I display them appropriate message.
Stop right there. Don't scold your user for choosing an option that you gave them. You should programmaticall y change the user's possible options to only those that are valid. You have to make the check anyway, so do it before not after they make a selection.
Now how do I restrict user from entering for Future week
Programmaticall y change the list of items in the combo.
if year is less than this year then you can have all the months
if year equals this year then you can only have months until this month
if year equals this year and months equals this month then you can have weeks until this week.
yeah this idea is good. I did not think in this way. I was trying to validate after the user could enter the data using javascript which was bit tiresome. Thanks for giving this solution.
Comment