EditItemTemplate and Delete problem!

3 posts, 1 answers
  1. ali
    ali avatar
    13 posts
    Member since:
    Dec 2008

    Posted 16 Feb 2009 Link to this post

    Hi

    When I click to Delete button, open delete confirm window and I click to OK button after return Object reference not set... message to me. I remove  

     

    <telerik:GridTemplateColumn HeaderText="Additional Charges" DataField="FeesAdditionalID" Display="false" UniqueName="FeesAdditionalID" >

     

     this column it s now OK. How can I fix it?

     

     <telerik:RadGrid ID="RadGrid1" Skin="Web20"  GridLines="None" runat="server" 
                    AllowAutomaticDeletes="True" AllowAutomaticInserts="True" Width="100%" 
                    AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="SessionDataSource1" AllowFilteringByColumn="True" AllowSorting="True">  
                    <PagerStyle Mode="NextPrevAndNumeric" /> 
                    <MasterTableView   Width="100%" CommandItemDisplay="Top" DataKeyNames="ID" 
                        DataSourceID="SessionDataSource1" HorizontalAlign="NotSet">  
                        <Columns> 
     
     <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmText="Delete this item?"  ConfirmDialogType="RadWindow"  Text="Delete" UniqueName="column1">  
                                </telerik:GridButtonColumn> 
                                  
                                <telerik:GridEditCommandColumn ButtonType="ImageButton">  
                                </telerik:GridEditCommandColumn> 
     
     <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" EmptyDataText="&amp;nbsp;" HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID">  
                                </telerik:GridBoundColumn> 
     
      <telerik:GridTemplateColumn HeaderText="Additional Charges" DataField="FeesAdditionalID" Display="false" UniqueName="FeesAdditionalID" > 
                                    <EditItemTemplate> 
                                         <asp:DropDownList ID="ddlTOC" runat="server" SelectedValue='<%# Bind("FeesAdditionalID") %>' DataTextField="ChargeName" DataValueField="FeesAdditionalID" DataSourceID="sqlFeesAdditional" AppendDataBoundItems="True">  
                                            <asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem> 
                                        </asp:DropDownList> 
                                    </EditItemTemplate> 
                                </telerik:GridTemplateColumn> ....  
     
     <asp:SqlDataSource ID="SessionDataSource1"....<DeleteParameters> 
                        <asp:Parameter Name="ID" Type="Int32" /> 
                    </DeleteParameters>... 

     

     




  2. Answer
    Vlad
    Admin
    Vlad avatar
    11043 posts
    Member since:
    Sep 2012

    Posted 17 Feb 2009 Link to this post

    Hello ali,

    Can you post the stack trace?

    Kind regards,
    Vlad
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

  3. DevCraft Release
  4. ali
    ali avatar
    13 posts
    Member since:
    Dec 2008

    Posted 17 Feb 2009 Link to this post

    Hello

    I change gridtemplate column with dropdownlist colum and fix it. But has been a bug!

    Thank you.

Back to Top