Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - MaskedEditExtender with existing

 
Thread Tools Search this Thread
Old 11-02-2009, 10:59 PM   #1
Default MaskedEditExtender with existing


I am trying to use the Ajax toolkit control MaskedEditExtender. I find that
when I use it on a control that already has a date in it the date goes away
in edit. Can I make it so that the date and time that is already bound
shows up in the mask? Below is what I am using in my GridView. Thanks.
David

<asp:TemplateField HeaderText="Start Time"
SortExpression="StartTime">
<EditItemTemplate>
<asp:TextBox ID="txtStartTime" runat="server"
Text='<%# Bind("StartTime") %>'></asp:TextBox>
<cc1:MaskedEditExtender ID="MaskedEditExtender1"
runat="server" AcceptAMPM="True"
TargetControlID="txtStartTime"
MaskType="DateTime" Mask="99/99/9999 99:99">
</cc1:MaskedEditExtender>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LblStartTime" runat="server"
Text='<%# Bind("StartTime", "{0:h:mm tt}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>




David C
  Reply With Quote
Old 11-05-2009, 06:48 PM   #2
Alexey Smirnov
 
Posts: n/a
Default Re: MaskedEditExtender with existing
On Nov 2, 11:59*pm, "David C" <dlch...@lifetimeinc.com> wrote:
> I am trying to use the Ajax toolkit control MaskedEditExtender. I find that
> when I use it on a control that already has a date in it the date goes away
> in edit. *Can I make it so that the date and time that is already bound
> shows up in the mask? *Below is what I am using in my GridView. *Thanks.
> David
>
> * * * * * * * * <asp:TemplateField HeaderText="Start Time"
> SortExpression="StartTime">
> * * * * * * * * * * <EditItemTemplate>
> * * * * * * * * * * * * <asp:TextBox ID="txtStartTime" runat="server"
> Text='<%# Bind("StartTime") %>'></asp:TextBox>
> * * * * * * * * * * * * <cc1:MaskedEditExtender ID="MaskedEditExtender1"
> runat="server" AcceptAMPM="True"
> * * * * * * * * * * * * * * * * TargetControlID="txtStartTime"
> MaskType="DateTime" Mask="99/99/9999 99:99">
> * * * * * * * * * * * * </cc1:MaskedEditExtender>
> * * * * * * * * * * </EditItemTemplate>
> * * * * * * * * * * <ItemTemplate>
> * * * * * * * * * * * * <asp:Label ID="LblStartTime" runat="server"
> Text='<%# Bind("StartTime", "{0:h:mm tt}") %>'></asp:Label>
> * * * * * * * * * * </ItemTemplate>
> * * * * * * * * </asp:TemplateField>


Hi David,

please look at the following example, I think this is exactly how you
want to do this
http://www.obout.com/grid/grid_integ...x_toolkit.aspx

Hope this helps


Alexey Smirnov
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
wireless router setup with existing mdsd77 General Help Related Topics 1 05-06-2008 05:48 PM
Trying to add an addl computer to an existing wireless network =?Utf-8?B?c3J3?= Wireless Networking 1 10-11-2006 01:59 AM
Add Wireless Access Point to Existing Wireless Router? Pegleg Wireless Networking 9 08-28-2006 08:16 PM
assigning unpartitioned space to an existing partition werd Computer Support 0 11-02-2005 09:49 PM
adding an sil 860 ata/133 controller card alongside existing onboard raid Colin Day Computer Support 0 11-24-2004 10:20 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46