网格视图中的日期时间选择器 [英] datetime picker inside a gridview

查看:109
本文介绍了网格视图中的日期时间选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正面临着需要在Gridview中使用日期时间选择器的情况.

我的日期时间在网格外部.但是当涉及到网格内部时,它不会填充Date时间.



问候,

I am a facing a situation in which i need to use a Date time picker inside a Gridview.

My Date time is working in Outside the grid. But when it comes to inside the Grid its not populating the Date time .



Regards,

推荐答案

我认为您正在遵循文章
I think you are following the codes given in article DateTimePicker in ASP.Net GridView using jQuery DateTimePicker Plugin[^].
I downloaded the code and tested. It is working fine.

I can see one difference in your code.
The code should be like below...
<asp:TemplateField HeaderText="Date Of Birth">
           <ItemTemplate>
               <asp:TextBox ID="txtDOB" runat="server" ReadOnly="true" class = "Calender" />
               <img src="calender.png" />
           </ItemTemplate>
       </asp:TemplateField>


而您在asp:TemplateField标记内没有ItemTemplate标记.
将用于日历和日历图像的文本框放在ItemTemplate内.

还有一件事.确保已将所有css和js文件添加到项目中.
如果您没有正确的路径,这将无法正常工作.
您可以在Mozilla浏览器的Firebug的控制台面板中看到这些错误.

谢谢...
快乐的编码...:)


whereas you don''t have the ItemTemplate tags inside asp:TemplateField tags.
Place your textbox for calendar and calendar image inside the ItemTemplate.

And one more thing. Make sure you have all css and js files added to the project.
In case you don''t have them at correct path, this will not work.
You can see these errors in the console panel of the firebug of Mozilla browser.

Thanks...
Happy coding...:)


^ ]
ASP.NET网格-在网格内部使用DatePicker [如何将datePicker添加到ASP.NET Gridview [ ^ ]
gridview中的日期时间选择器. [
Add DateTimePicker in Gridview[^]
ASP.NET Grid - Using the DatePicker inside the Grid[^]
How to add a datePicker to a ASP.NET Gridview[^]
datetime picker inside gridview..[^]


这篇关于网格视图中的日期时间选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆