Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have linked a java calender in a grid text box column by following code:

XML
<script type="text/javascript" >
       $(document).ready(function () {
           Sys.WebForms.PageRequestManager.getInstance().add_endRequest(griddate1);
           griddate1();
       });
       function griddate1() {
           $("input[type=text][id*=txtScheduleDispatchDate]").datepicker({ minDate: '-0d', dateformat: "dd-mm-yy" });
           $("input[type=text][id*=txtScheduleDispatchDate]").datepicker("option", "dateFormat", "dd-mm-yy");
       }
      </script>


And then I am using following code to link datatable with grid:

VB
gdDispatch.DataSource = dtDispatch
          gdDispatch.DataBind()


Following is the text box column code for showing calender:
XML
<asp:TemplateField HeaderText="Schedule Dispatch Date">
                 <ItemTemplate>
                       <asp:TextBox ID="txtScheduleDispatchDate" runat="server"  Width="100" MaxLength="10" Text='<%# Eval("ScheduleDispatchDate")%>'  OnTextChanged="txtScheduleDispatchDate_TextChanged" AutoPostBack="true"></asp:TextBox>
                  </ItemTemplate>
 </asp:TemplateField>



NOW, the problem is that dates from datatable are not showing in grid column when calender is linked.

Pls Advise
Thanks
Atul
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900