|
Hi all,
I would like to know if there is a way to disable all date selections before the current date in the asp.net calendar control. The part to disable or strike-out the date should be something like this :-
<cal>.DayStyle.Font.Strikeout = True
<cal>.SelectionMode = CalendarSelectionMode.None
but how do we select all the dates < the current on which the above could be applied?
tks
|
|
|
|
|
On the calender day render event you set the e.Day.IsSelected = False if you don't want the day selectable.
Here is an example from MS help:
Protected Sub Calendar1_DayRender(ByVal sender As Object, _
ByVal e As DayRenderEventArgs) Handles Calendar1.DayRender
Dim myAppointment As Date = New Date(2005, 10, 1)
If (e.Day.Date = myAppointment) Then
e.Day.IsSelectable = True
Else
e.Day.IsSelectable = False
End If
End Sub
Hope that helps.
Ben
|
|
|
|
|
WORKS BEAUTIFUL!!!!!!!! thanks a lot Ben
|
|
|
|
|
Hello all,
I have three tables:
Tablename 1: Agent
Collums:
Agentnumber (PK)
Agentname
Tablename 2: Agent_Group
Collums:
Agentnumber (FK, connection with Agentnumber of Agent table)
Groupnumber (FK, connection with Groupnumber of group table)
Tablename 3: Group
Collumns:
Groupnumber (PK)
Groupname
Now i need to show the names of the agents which belong to (for example) groupnumber 300.
This is the SELCECT statement i made:
SELECT Agent.Agentname
FROM (Agent_Group INNER JOIN
Agent ON Agent_Group.Agentnumber = Agent.Agentnumber)
WHERE (Agent_Groep.Groupsnumber = ?)
The "?" is a variable, called groupNumber.
Wen run the statement in the querybuilder i get some results bun when running the application i get the error message:
"An unhandled exception of type 'System.Data.ConstraintException' occurred in system.data.dll"
Maybee som extra info (in dutch):
Additional information: Beperkingen konden niet worden ingeschakeld. Een of meer rijen bevatten waarden die in strijd zijn met de beperkingen met betrekking tot niet-null waarden, unieke waarden of afwijkende sleutels.
The following statement works fine but then i see only the agentnumbers who belong to group 300.
SELECT Agentnummer, Groepsnummer
FROM Agent_Groep
WHERE (Groepsnummer = ?)
Somebody any idea?
Thanks
|
|
|
|
|
This is a question for the SQL Forum.
The Babelfish translation is a bit rough, but, it would appear that you have a key constraint violation in your INNER JOIN. You shouldn't be allowing NULL's on the keys, primary or foreign, in either table. Also, is the data constistent? Do ALL of the FK values in the Agent_Group table actually exist in the PK's of the other two tables?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I am trying to find some VB .net 2005 code that will help me to read and pass individual records from an Access table to a (formated) Text file file. How do I write the individual lines? TIA
|
|
|
|
|
You have to write your own parser for this. Fetch records from your access DB and insert them line by line in a Text file. See THIS for how to read/write data into a text file
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
Thanks Mubashir. I though that would be it, but I wondered if anyone already had some code scenarios that i could modify.
|
|
|
|
|
That's not how this site works. We'll help you write your own code, we won't write it for you. Why?? Because you wouldn't learn anything if we did the work.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Thanks for the input and patience. Through trial and error, I am now in an advances stage of writing a custom parser (using the WriteLine method). Appreciate the help.
|
|
|
|
|
Hello all,
I was just wondering if there is any way to make a form to minimize to the windows toolbar (the one with clock).
So, when minimized there will be an icon of the application next to the clock (bottom right) that is when i right click on it, there will be a menu showing.
Thanks
|
|
|
|
|
|
Thanks Kubben
|
|
|
|
|
How To compare data in array A and array B
|
|
|
|
|
Do U need this?
Using simple for loop
we can achieve this.
flag=true
for i=0 to n
if a(i) not equal to b(i) then
flag=false
next
if flag = false then
the arrays are not equal.
If U want something else other than this,
U will have to elaborate so that everyone can understand
what U really need.
Regards,
Arun Kumar.A
|
|
|
|
|
|
How to use crystal report Engine 10 in vb.net and open my *.rpt
so i don't like using crviewer in .net for opening my report
help me
ahmadi
|
|
|
|
|
hi,
so where do you want you to view your report if you don't like to use crviewer?
Don't block the drive way of all the newbies in programming.
|
|
|
|
|
I want the user to be able to choose the colours of the title, score, lives etc
I thought if I have a text file in the folder with the colours,
Red
Yellow
Blue
How do I then transfer it to the project?
Title.color = text line one
Score.color = text line two
Lives.color = text line three
|
|
|
|
|
If you accept words, you may be able to use reflection if they are colors in the enum the framework provides. Otherwise, you need a lookup table to establish what "Red" means, if it's Colors.Red, or if it's 0XFF0000, or whatevr.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello all,
Does anyone know how to use variable values in SELECT statements?
Thanks
|
|
|
|
|
The obvious way is to concatenate strings. The better way is to write a stored procedure. Either way, you need to be careful of SQL injection attacks.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hello
i have generated one datagrid using dataset having columns user_id,initial,passwd,access etc. From these i am displaying only 3 columns my query is -
select user_id as user,user_init as inital,user_nm as name
from user_mast
but i am facing one problem i.e. after adding new record in dataset my datagrid is displaying all columns including passwd also which is not to be shown.
Pliz. guide me how i solve this problem?
thanks
reply immediate
thanks
|
|
|
|
|
Hi,
You should set AutoGenerateColumn to False
|
|
|
|
|
hi,
try to insert a query again using select statement after you add your record. to show specific column you want to show.
Don't block the drive way of all the newbies in programming.
|
|
|
|