TimePicker Control not working in gridview

Sep 23, 2011 at 2:49 PM

I have timepicker control in my gridview , here is the maskup :-

      <asp:GridView ID="gvAlertTypes" runat="server" AutoGenerateColumns="False" 
                   CellPadding="4" ForeColor="#333333" DataKeyNames ="Alert_Type_ID" 
                   DataSourceID="SqlDataSource1" Width ="100%" >
                   <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                   <EditRowStyle BackColor="#999999" />
                   <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                   <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                   <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                   <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                   <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                   <SortedAscendingCellStyle BackColor="#E9E7E2" />
                   <SortedAscendingHeaderStyle BackColor="#506C8C" />
                   <SortedDescendingCellStyle BackColor="#FFFDF8" />
                   <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                   <Columns >
                     
                       <%--<asp:CommandField ShowEditButton="True" ShowDeleteButton ="true"  />--%>
                     <asp:TemplateField >
         <ItemTemplate>
                 <asp:LinkButton ID="lkEdit" runat ="server" Text ="Edit" CommandName="Edit" CausesValidation ="false" ></asp:LinkButton>
                 <asp:LinkButton ID="lkDelete" runat ="server" Text ="Delete" CommandName ="Delete" CausesValidation ="false" OnClientClick ='return confirm("Are you sure you want to delete this Alert Type?");' ></asp:LinkButton>
         </ItemTemplate>
         <EditItemTemplate >
                 <asp:LinkButton ID="lkUpdate" runat ="server" Text ="Update" CommandName="Update" ValidationGroup ="editData"></asp:LinkButton>
                 <asp:LinkButton ID="lkCancel" runat ="server" Text ="Cancel" CommandName="Cancel" CausesValidation ="false" ></asp:LinkButton>
         </EditItemTemplate>
         
     </asp:TemplateField>
                     <asp:TemplateField HeaderText ="Alert Subject" >
                         <ItemTemplate >
                            <asp:Label ID="lblAlertSubject" runat ="server" Text ='<%#EVAL("Alert_Subject") %>'></asp:Label>
                         </ItemTemplate>
                         <EditItemTemplate >
                            <asp:TextBox ID="txtAlertSubject" runat ="server" Text ='<%#EVAL("Alert_Subject") %>' MaxLength ="250" Width ="550px" TextMode="MultiLine"  ></asp:TextBox>
                         </EditItemTemplate>
                     </asp:TemplateField>
                     <asp:TemplateField HeaderText ="Alert Level" >
                         <ItemTemplate >
                            <asp:Label ID="lblAlertLevel" runat ="server" Text ='<%#EVAL("Alert_Level") %>'></asp:Label>
                         </ItemTemplate>
                         <EditItemTemplate >
                            <asp:HiddenField ID="hdAlertLevel" runat ="server" Value ='<%#EVAL("Alert_Level_ID") %>' />
                            <asp:DropDownList ID="ddlAlertLevels" runat ="server" DataSourceID ="SqlDataSource2" DataValueField ="Alert_Level_ID" DataTextField ="Alert_Level"  >
                            </asp:DropDownList>
                         </EditItemTemplate>
                     </asp:TemplateField>
                     <asp:TemplateField HeaderText ="Alert State" >
                         <ItemTemplate >
                            <asp:Label ID="lblAlertState" runat ="server" Text ='<%#EVAL("Proj_State") %>'></asp:Label>
                         </ItemTemplate>
                         <EditItemTemplate >
                            <asp:HiddenField ID="hdAlertState" runat ="server" Value ='<%#EVAL("Alert_State") %>' />
                            <asp:DropDownList ID="ddlAlertStates" runat ="server" DataSourceID ="SqlDataSource3" DataValueField ="Proj_State_Code" DataTextField ="Proj_State"  >
                            </asp:DropDownList>
                         </EditItemTemplate>
                     </asp:TemplateField>
                     <asp:TemplateField HeaderText ="Alert Occurence">
                          <ItemTemplate >
                                <asp:Label ID="lblAlertOccurenceDescr" runat ="server" Text ='<%#EVAL("Alert_Occurence_Description") %>'></asp:Label>
                          </ItemTemplate>
                          <EditItemTemplate >
                          <asp:HiddenField ID="hdAlertOccurenceID" runat ="server" Value ='<%#EVAL("Alert_Occurence_ID") %>' />
                            <asp:DropDownList ID="ddlAlertOccurences" runat ="server" DataSourceID ="SqlDataSource4" DataValueField ="Alert_Occurence_ID" DataTextField ="Alert_Occurence_Description"  >
                            </asp:DropDownList>
                          </EditItemTemplate>
                     </asp:TemplateField>
                     <asp:TemplateField HeaderText ="Alert Occurence Time">
                     <ItemStyle Width ="100px" />
                     <HeaderStyle Width ="100px" />
                           <ItemTemplate >
                                <asp:Label ID="lblAlertOccurenceTime" runat ="server" Text ='<%#EVAL("Alert_Occurence_Time") %>'></asp:Label>
                          </ItemTemplate>
                          <EditItemTemplate >
                              <MKB:TimeSelector ID="TimeSelector1" runat="server" DisplaySeconds="False"  MinuteIncrement="1" AmPm="AM" BorderColor="Silver"
                                                SelectedTimeFormat="Twelve" ></MKB:TimeSelector> 
                          </EditItemTemplate>
                     </asp:TemplateField>
                      </Columns>
               </asp:GridView>

Whenever  I try to click on button in timepicker to change time , it throws an javascript error "Object REquired".