Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
556
WebDateChooser no longer functions as EditorID after 2nd DataBind
posted

I am editing a DateTime field in a WebDataGrid and using the WebDateChooser as the Editor provider.  This is all done statically in my web page and not in my code-behind.  It works fine the after the first time the WebDataGrid is databound.  If the user changes his selection criteria and it is bound a 2nd time,  the Popup calendar no longer shows up and the field is edited as plain text.

 

<table align="center">
        <tr>
            <td>
                <asp:UpdatePanel ID="upGetConfNums" runat="server">
                    <ContentTemplate>
                     <table align="center">
                            <tr>
                                <td class="label" align="right">Conf. #'s (separated by commas or spaces): </td>
                                <td align="left">
                                    <des:TextBox ID="tbConfList" runat="server" MaxLength="300" Width="750px"
                                        Height="18px" />
                                </td>
                            </tr>
                            <tr>
                             <td align="right">
                                </td>
                             <td align="left">
                                    <des:Button ID="btnGetRecords" runat="server" Text="Get Records"
                                        onclick="btnGetRecords_Click" />
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnGetRecords" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:UpdatePanel ID="upUpdateCallTimes" runat="server" Visible="True">
                    <ContentTemplate>
                        <ig:WebDataGrid ID="wdgCMSVSVNCallDates" runat="server" Height="350px"
                            Width="400px" AutoGenerateColumns="False"
                            DataSourceID="sqldsCMSVSVNCallDates" DataKeyFields="Conf_Num"
                            onrowupdated="wdgCMSVSVNCallDates_RowUpdated"
                            onrowupdating="wdgCMSVSVNCallDates_RowUpdating"  >
                            <Behaviors>
                                <ig:EditingCore>
                                    <Behaviors>
                                        <ig:CellEditing>
                                            <ColumnSettings>
                                                <ig:EditingColumnSetting ColumnKey="CallTime"
                                                    EditorID="WebDateChooserProvider1" />
                                                <ig:EditingColumnSetting ColumnKey="Conf_Num" ReadOnly="True" />
                                                <ig:EditingColumnSetting ColumnKey="Category" ReadOnly="True" />
                                            </ColumnSettings>
                                            <CellEditingClientEvents ExitedEditMode="cellEdited" />
                                        </ig:CellEditing>
                                    </Behaviors>
                                </ig:EditingCore>
                                <ig:RowSelectors>
                                </ig:RowSelectors>
                                <ig:Activation>
                                </ig:Activation>
                            </Behaviors>
                            <Columns>
                                <ig:BoundDataField DataFieldName="Conf_Num" Key="Conf_Num">
                                    <Header Text="Conf_Num" />
                                </ig:BoundDataField>
                                <ig:BoundDataField DataFieldName="CallTime" Key="CallTime">
                                    <Header Text="CallTime" />
                                </ig:BoundDataField>
                                <ig:BoundDataField DataFieldName="Category" Key="Category">
                                    <Header Text="Category" />
                                </ig:BoundDataField>
                            </Columns>
                            <EditorProviders>
                                <ig:WebDateChooserProvider ID="WebDateChooserProvider1" />
                            </EditorProviders>
                        </ig:WebDataGrid>
                        <asp:SqlDataSource ID="sqldsCMSVSVNCallDates" runat="server"
                            ConnectionString="<%$ ConnectionStrings:Springwise %>"
                            SelectCommand="GetCMSVSVNCallDatesByConfNumArray"
                            UpdateCommand="UpdateVSVNWorkCallTime"
                            SelectCommandType="StoredProcedure" UpdateCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:Parameter Name="ConfNums" Type="String" DefaultValue="<ArrayOfString><string Conf_Num='~!@#$' /></ArrayOfString>" />
                            </SelectParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="Conf_Num" Type="String" />
                                <asp:Parameter Name="CallTime" Type="DateTime" />
                            </UpdateParameters>
                        </asp:SqlDataSource>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnGetRecords" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>

 

Parents
No Data
Reply
  • 556
    Verified Answer
    posted

    Apparently, it was something going in in the RowUpdated or RowUpdating methods I had before I switched to committing to the DB after cell changes, which I did because I would not get commit when I had only 1 row.  I had an e.Cancel() in RowUpdating, because I had some problems with getting null dates, but I had no null dates in the records I was currently working with.  Maybe it was just having those methods performed.

Children
No Data