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

EditItemTemplate and Delete problem!

2 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ali
Top achievements
Rank 1
ali asked on 16 Feb 2009, 11:19 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 17 Feb 2009, 11:58 AM
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.
0
ali
Top achievements
Rank 1
answered on 17 Feb 2009, 12:09 PM
Hello

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

Thank you.
Tags
Grid
Asked by
ali
Top achievements
Rank 1
Answers by
Vlad
Telerik team
ali
Top achievements
Rank 1
Share this question
or