![]() |
|
|
|||||||
![]() |
ASP Net - MaskedEditExtender with existing |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Posts: n/a
|
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 |
|
![]() |
| Thread Tools | Search this Thread |
|
|
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 |