473,395 Members | 1,422 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Calendar control in formview

Hi

I've been googling for AGES but still no joy so would really appreciate help!!

I have a form view with a calendar control in it's edit item template. It displays the date from the database correctly, but when I select a different date it:
1) closes the edit template without updating and
2) doesn't update the record (because it's closing the template too early?)

here's my markup:
<asp:FormView ID="fvMeet" runat="server" DataKeyNames="Code" DataSourceID="dsMeetingById">
<EditItemTemplate>
MeetingDate:
<asp:Calendar ID="Calendar2" runat="server" SelectedDate='<%# CType(Eval("MeetingDate"), DateTime).Date %>'
VisibleDate='<%# CType(Eval("MeetingDate"), DateTime).Date %>'></asp:Calendar>
<br />

<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="Update" CssClass="linkbutton" EnableViewState="False"></asp:LinkButton>
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel" EnableViewState="False" CssClass="linkbutton"></asp:LinkButton>
</EditItemTemplate>

.....

i have also tried with

SelectedDate='<%# Bind("MeetingDate") %>'
VisibleDate='<%# Eval("MeetingDate") %>'

but no joy
:(
Mar 22 '07 #1
0 1222

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: nate | last post by:
the error returned is this: Server Error in '/AnnAccRpt' Application. -------------------------------------------------------------------------------- Could not find control 'DropDownList1' in...
3
by: sck10 | last post by:
Hello, I am trying to bind an arraylist to a FormView DropDownList control in the PreRender state. The error that I get is the following: Databinding methods such as Eval(), XPath(), and...
2
by: Ned Balzer | last post by:
I'm trying to create a formview bound to a sqldatasource, and use a stored procedure to insert data from the formview into several tables. I have some simplified code below, the real code is much...
1
by: Dabbler | last post by:
I'm trying to customize calendar days using data in a table. Some days may have corresponding rows in the table giving counts for that day. I'm not clear on when I should get the data from the...
1
by: Loading name... | last post by:
Hey asp.net 2.0 I have a FormView on my webpage. This FormView's datasource is a SqlDataSource object. This SqlDataSource returns 1 datetime field. So I've added a Calendar control to the...
2
by: David C | last post by:
Using .Net 2 and VS2005. I have a calendar control in a TD cell of a table in the edit template of a FormView. I have the calendar .Visible property set to false but the control still uses up all...
2
by: DotNetNubie66 | last post by:
I have a Master page that wraps my content pages, on one page I have a FormView that is tied to an ObjectDataSource and has textbox and calendar controls bound to the datasource. My problem is this,...
4
by: Cirene | last post by:
I have a formview control. When the user goes into insert mode I want to set the Calendar to today's date. How can I accomplish this? I know it's probably only 1 or 2 lines of code. I...
0
by: cs_in_va | last post by:
I have a calendar (Cal1) inside a formview (fv) when the date is chanded I want to display the date on the label, vlblDate. Protected Sub Cal1_SelectionChanged(ByVal sender As Object, ByVal e...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.