This is a migrated thread and some comments may be shown as answers.

c00ce514 on delete

3 Answers 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 07 Oct 2013, 02:14 PM
I have added a few additional fields to my grid, and now when I click on the delete button i get the "Microsoft JScript runtime error: Could not complete the operation due to error c00ce514."  

Any ideas on what to check would be great.  

<telerik:RadGrid ID="gvEnCounterDetails" runat="server" AutoGenerateColumns="False"
        CellSpacing="0" DataSourceID="dsEncounterDetails" GridLines="None" AllowAutomaticInserts="True"
        AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" Width="900px">
        <ExportSettings>
            <Pdf>
                <PageHeader>
                    <LeftCell Text=""></LeftCell>
                    <MiddleCell Text=""></MiddleCell>
                    <RightCell Text=""></RightCell>
                </PageHeader>
                <PageFooter>
                    <LeftCell Text=""></LeftCell>
                    <MiddleCell Text=""></MiddleCell>
                    <RightCell Text=""></RightCell>
                </PageFooter>
            </Pdf>
        </ExportSettings>
        <MasterTableView DataKeyNames="PatientID,EncounterID" DataSourceID="dsEncounterDetails"
            CommandItemDisplay="Top" RetrieveNullAsDBNull="True">
            <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Add Encounter"
                ShowRefreshButton="False"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditColumn" HeaderStyle-Width="30px">
                    <ItemStyle CssClass="linkUnderline" HorizontalAlign="Center" Wrap="False"></ItemStyle>
                </telerik:GridEditCommandColumn>
 
                <telerik:GridDateTimeColumn DataField="sDOS" DataType="System.DateTime" FilterControlAltText="Filter sDOS column"
                    HeaderText="DOS" SortExpression="sDOS" UniqueName="sDOS" DataFormatString="{0:MM/dd/yyyy}"
                    Visible="True" HeaderStyle-Width="75px" >
 
                    <%--<ColumnValidationSettings EnableRequiredFieldValidation="true">
                    <RequiredFieldValidator ForeColor="Red" ErrorMessage="*Required"></RequiredFieldValidator>                   
            </ColumnValidationSettings>--%>
                </telerik:GridDateTimeColumn>
                <telerik:GridBoundColumn DataField="sRoomNumber" FilterControlAltText="Filter sRoomNumber column"
                    HeaderText="Room #" SortExpression="sRoomNumber" UniqueName="sRoomNumber" HeaderStyle-Width="75px">
                </telerik:GridBoundColumn>
                <telerik:GridDropDownColumn DataSourceID="dsEncounterTypes" ListTextField="EncounterType"
                    ListValueField="EncounterTypeID" UniqueName="iServiceTypeID" SortExpression="iServiceTypeID"
                    DataField="iServiceTypeID" AllowAutomaticLoadOnDemand="true" DropDownControlType="DropDownList"
                    EditFormColumnIndex="0" FilterControlAltText="Filter iServiceTypeID" HeaderText="Service Type"
                    HeaderStyle-Width="100px" ColumnEditorID="ServiceTypeColumnEditor" EmptyListItemText=""
                    EmptyListItemValue="" EnableEmptyListItem="True">
                </telerik:GridDropDownColumn>
 
                <telerik:GridTemplateColumn DataField="sAttendingProviderNumber" EditFormColumnIndex="0"
                    FilterControlAltText="Filter sAttendingProviderNumber column" HeaderText="Provider"
                    SortExpression="sAttendingProviderNumber" UniqueName="sAttendingProviderNumber"
                    HeaderStyle-Width="190px">
 
                     
                    <EditItemTemplate>
                        <telerik:RadDropDownList ID="sAttendingProviderNumberDDL" runat="server" DataSourceID="dsAttendingDocs"
                            DataTextField="DOCNAME" DataValueField="DOCCODE" SelectedValue='<%# Bind("sAttendingProviderNumber") %>'
                            AppendDataBoundItems="True" Width="185px">
                            <Items>
                                <telerik:DropDownListItem runat="server" Text="Select an Attending Provider" Value="" />
                            </Items>
                        </telerik:RadDropDownList>
                    </EditItemTemplate>
 
                    <ItemTemplate>
                        <telerik:RadDropDownList ID="sAttendingProviderNumberDDL" runat="server" DataSourceID="dsAttendingDocs"
                            DataTextField="DOCNAME" DataValueField="DOCCODE" SelectedValue='<%# Bind("sAttendingProviderNumber") %>'
                            AppendDataBoundItems="True" Width="185px" OnSelectedIndexChanged="sAttendingProviderNumberDropDownList_SelectedIndexChanged"
                            Enabled='<%# CanBeEditedByUser() %>' AutoPostBack="True" CausesValidation="False">
                            <Items>
                                <telerik:DropDownListItem runat="server" Text="Select Assigned Provider" Value="" />
                            </Items>
                        </telerik:RadDropDownList>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
 
 
 
                <telerik:GridTemplateColumn DataField="sSecondaryProviderNumber" EditFormColumnIndex="0"
                    FilterControlAltText="Filter sSecondaryProviderNumber column" HeaderText="Secondary Provider"
                    SortExpression="sSecondaryProviderNumber" UniqueName="sSecondaryProviderNumber"
                    HeaderStyle-Width="190px" Visible="False">
 
                     
                    <EditItemTemplate>
                        <telerik:RadDropDownList ID="sSecondaryProviderNumberDDL" runat="server" DataSourceID="dsAttendingDocs"
                            DataTextField="DOCNAME" DataValueField="DOCCODE" SelectedValue='<%# Bind("sSecondaryProviderNumber") %>'
                            AppendDataBoundItems="True" Width="185px">
                            <Items>
                                <telerik:DropDownListItem runat="server" Text="Select Secondary Provider" Value="" />
                            </Items>
                        </telerik:RadDropDownList>
                    </EditItemTemplate>
 
 
                </telerik:GridTemplateColumn>
 
 
                <telerik:GridTemplateColumn DataField="iLocationCodeID" EditFormColumnIndex="0"
                    FilterControlAltText="Filter iLocationCodeID column" HeaderText="Location"
                    SortExpression="iLocationCodeID" UniqueName="iLocationCodeID"
                    HeaderStyle-Width="190px">
 
                    <ItemTemplate>
                        <telerik:RadDropDownList ID="ddlLocationDDL" runat="server" DataSourceID="dsLocationCodes"
                            DataValueField="LocationCodeID" DataTextField="LocationDesc"
                            Width="300px" SelectedValue='<%# Bind("iLocationCodeID") %>'
                             Enabled='<%# CanBeEditedByUser() %>' AutoPostBack="True" CausesValidation="False">
                        </telerik:RadDropDownList>
          
                    </ItemTemplate>
 
 
 
 
                    <EditItemTemplate>
 
                        <telerik:RadDropDownList ID="ddlLocationDDL" runat="server" DataSourceID="dsLocationCodes"
                            DataValueField="LocationCodeID" DataTextField="LocationDesc" CausesValidation="False"
                            Width="300px" SelectedValue='<%# Bind("iLocationCodeID") %>'>
                        </telerik:RadDropDownList>
          
                    </EditItemTemplate>
 
 
                </telerik:GridTemplateColumn>
 
 
 
                <telerik:GridTemplateColumn DataField="iSeenByProvider" EditFormColumnIndex="0" DataType="System.Boolean"
                    DefaultInsertValue="False" FilterControlAltText="Filter Seen By Provider" HeaderText="Seen By Provider"
                    SortExpression="iSeenByProvider" UniqueName="iSeenByProvider"
                    HeaderStyle-Width="50px">
                     
 
 
                    <EditItemTemplate>
                        <asp:CheckBox ID="iSeenByProviderCheckBox" runat="server" AutoPostBack="false" Checked='<%# Bind("iSeenByProvider") %>' />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="iSeenByProviderCheckBox" runat="server" AutoPostBack="true" Enabled='<%# CanBeEditedByUser() %>'
                            Checked='<%# Eval("iSeenByProvider") %>' OnCheckedChanged="ToggleSeenByProvider" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
 
                <telerik:GridTemplateColumn DataField="iNotSeenByProvider" EditFormColumnIndex="0"
                    DataType="System.Boolean" DefaultInsertValue="False" FilterControlAltText="Filter Not Seen By Provider"
                    HeaderText="Not Seen By Provider" SortExpression="iNotSeenByProvider" UniqueName="iNotSeenByProvider"
                    HeaderStyle-Width="50px">
                     
     
 
                    <EditItemTemplate>
                        <asp:CheckBox ID="iNotSeenByProviderCheckBox" runat="server" AutoPostBack="false" Checked='<%# Bind("iNotSeenByProvider") %>' />
                        <asp:HiddenField ID="hdnPatientID" runat="server" Value='<%# Eval("PatientID") %>' />
                        <asp:HiddenField ID="hdnEncounterID" runat="server" Value='<%# Eval("EncounterID") %>' />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="iNotSeenByProviderCheckBox" runat="server" AutoPostBack="true"
                            Enabled='<%# CanBeEditedByUser() %>' Checked='<%# Eval("iNotSeenByProvider") %>'
                            OnCheckedChanged="ToggleNotSeenByProvider" />
                        <asp:HiddenField ID="hdnPatientID" runat="server" Value='<%# Eval("PatientID") %>' />
                        <asp:HiddenField ID="hdnEncounterID" runat="server" Value='<%# Eval("EncounterID") %>' />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
 
 
                <telerik:GridButtonColumn ButtonType="ImageButton" Text="Delete" UniqueName="DeleteColumn"
                    CommandName="Delete" ItemStyle-Width="30px" HeaderStyle-Width="30px"
                    ConfirmText="Delete this Encounter?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete Encounter?">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings ColumnNumber="1" CaptionDataField="sDOS" CaptionFormatString="Edit details"
                InsertCaption="New Encounter">
                <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                <%--<FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="2" Width="100%"></FormMainTableStyle>
               <FormTableStyle CellSpacing="0" CellPadding="2"></FormTableStyle>--%>
                <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                <EditColumn ButtonType="ImageButton" InsertText="Add Encounter" UpdateText="Update Encounter"
                    UniqueName="EditCommandColumn1" CancelText="Cancel">
                </EditColumn>
                <FormTableButtonRowStyle HorizontalAlign="Left" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
            </EditFormSettings>
            <BatchEditingSettings EditType="Cell"></BatchEditingSettings>
            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
        </MasterTableView>
        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
 
    </telerik:RadGrid>

3 Answers, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 08 Oct 2013, 11:27 AM
Here is my RadAjaxManager...

Still have not been able to figure out whats wrong...
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline" >
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="gvEnCounterDetails">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="gvEnCounterDetails" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
 
         <telerik:AjaxSetting AjaxControlID="iSeenByProviderCheckBox">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="iSeenByProviderCheckBox" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="gvEnCounterDetails" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
 
         <telerik:AjaxSetting AjaxControlID="iNotSeenByProviderCheckBox">
                <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="iNotSeenByProviderCheckBox" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="gvEnCounterDetails" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
 
         <telerik:AjaxSetting AjaxControlID="ddlLocationDDL">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ddlLocationDDL" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="gvEnCounterDetails" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
 
         <telerik:AjaxSetting AjaxControlID="sAttendingProviderNumberDDL">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="sAttendingProviderNumberDDL" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="gvEnCounterDetails" LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelRenderMode="Inline"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
 
 
        </AjaxSettings>
    </telerik:RadAjaxManager>


Here is the Datasource...The delete is really just an update...

<asp:SqlDataSource ID="dsEncounterDetails" runat="server" ConnectionString="<%$ ConnectionStrings:CS %>"
        SelectCommand="GET_Patient_Encounter_Details" SelectCommandType="StoredProcedure"
        InsertCommand="Insert_Patient_Encounter" InsertCommandType="StoredProcedure"
        UpdateCommand="Update_Patient_Encounter" UpdateCommandType="StoredProcedure"
        DeleteCommand="Delete_Patient_Encounter" DeleteCommandType="StoredProcedure">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="sSiteID" QueryStringField="SID" Type="String" />
            <asp:QueryStringParameter DefaultValue="0" Name="PatientID" QueryStringField="PID" Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <%--<asp:Parameter Name="PatientID" Type="Int32" />--%>
            <asp:ControlParameter Name="PatientID" ControlID="hdniPatientID" PropertyName="Value" Type="Int32" />
            <asp:Parameter Name="EncounterID" Type="Int32" />
            <asp:Parameter Name="sDOS" Type="DateTime" />
            <asp:Parameter Name="sRoomNumber" Type="String" />
            <asp:Parameter Name="iServiceTypeID" Type="Int32" />
            <asp:Parameter Name="sAttendingProviderNumber" Type="String" />
            <asp:SessionParameter Name="sSource" SessionField="iuserid" />
            <asp:Parameter Name="iNotSeenByProvider" Type="Boolean" />
            <asp:Parameter Name="iSeenByProvider" Type="Boolean" />
            <asp:Parameter Name="sSecondaryProviderNumber" Type="String" />
            <asp:Parameter Name="iLocationCodeID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <%--<asp:Parameter Name="PatientID" Type="Int32" />--%>
            <asp:ControlParameter Name="PatientID" ControlID="hdniPatientID" PropertyName="Value" Type="Int32" />
            <asp:Parameter Name="sDOS" Type="DateTime" />
            <asp:Parameter Name="sRoomNumber" Type="String" />
            <asp:Parameter Name="iServiceTypeID" Type="Int32" />
            <asp:Parameter Name="sAttendingProviderNumber" Type="String" />
            <asp:SessionParameter Name="sSource" SessionField="iuserid" />
            <asp:Parameter Name="iNotSeenByProvider" Type="Boolean" />
             <asp:Parameter Name="iSeenByProvider" Type="Boolean" />
            <asp:Parameter Name="sSecondaryProviderNumber" Type="String" />
            <asp:Parameter Name="iLocationCodeID" Type="Int32" />
        </InsertParameters>
 
        <DeleteParameters>
            <asp:ControlParameter Name="PatientID" ControlID="hdniPatientID" PropertyName="Value" Type="Int32" />
            <asp:Parameter Name="EncounterID" Type="Int32" />
            <asp:SessionParameter Name="sSource" SessionField="iuserid" />
        </DeleteParameters>
 
    </asp:SqlDataSource>
0
Konstantin Dikov
Telerik team
answered on 10 Oct 2013, 11:19 AM
Hi Ryan,

When the RadGrid is set as initiator in the RadAjaxManager, there is no need to ajaxify the nested controls withing the TemplateColumn, since all controls in the grid will be already ajaxified. Please remove all your AJAX setting for the nested controls and see if it makes any difference.

If the above does not solve the issue, could you please try to set the "EnableAJAX" property of the RadAjaxManager to "false" and see if the error still occurs.

And finally, if both of the approaches does not resolve the problem, please provide the code-behind of your grid or (preferably) open a support ticket with sample, runnable project attached, so we could inspect it locally. 

Looking forward to your reply.

 

Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Ryan
Top achievements
Rank 1
answered on 10 Oct 2013, 11:32 AM
Konstantin,  I figured out I needed to have an <itemtemplate> for the  sSecondaryProviderNumber column.  After I added that All seems to be working as normal again.  I will go remove all the controls from the RadAjaxManager as those were just there in an effort to fix the issue. (I didnt originally have those in the page)
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or