Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > MaskedEditExtender with existing

Reply
Thread Tools

MaskedEditExtender with existing

 
 
David C
Guest
Posts: n/a
 
      11-02-2009
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>


 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      11-05-2009
On Nov 2, 11:59*pm, "David C" <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
MaskedEditExtender Question Bobby Edward ASP .Net 0 10-27-2008 08:54 PM
Saving in SQL db data from Calendarextender and Maskededitextender egsdar ASP .Net 1 10-27-2008 04:14 PM
Problem in MaskedEditExtender with javascript Abhi ASP .Net 0 08-05-2008 10:15 AM
Existing Dll - using Functions from an existing dll Tristin.Colby@gmail.com Ruby 0 02-05-2008 07:38 PM
Why no existing Java type to existing XML schema binding support? nrm Java 3 04-10-2006 04:52 PM



Advertisments