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

Getting Error When trying to use edit template

3 Answers 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 20 Apr 2009, 02:23 PM
I am trying to use a Custom edit template with 2 Checkboxes and a textbox however when I try to edit a record I get the following error.

"Automatic Updates,Inserts are supported only when the template is IBindable Template"
 
I am not sure what is happening as I have bound all the controls below is the Radgrid code.

<telerik:RadGrid ID="RadGrid4" runat="server" AllowAutomaticUpdates="True"   
                        AllowPaging="True" AutoGenerateEditColumn="True" DataSourceID="SqlDataPending"   
                        GridLines="None" Skin="Sunset" AllowSorting="True">  
                        <MasterTableView AutoGenerateColumns="False" CellSpacing="-1"   
                            DataKeyNames="JobNumber" DataSourceID="SqlDataPending">  
                            <RowIndicatorColumn> 
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <EditItemTemplate> 
                                <div style="height: 236px">  
                                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("Approved") %>' /> 
                                    <br /> 
                                    <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("Rejected") %>' /> 
                                    <br /> 
                                    <br /> 
                                    Notes:<br /> 
                                    <asp:TextBox ID="TextBox2" runat="server" Height="72px"   
                                        Text='<%# Bind("Notes") %>' Width="348px"></asp:TextBox> 
                                    <br /> 
                                    <asp:Button ID="Update" runat="server" Text="Update" /> 
                                    <asp:Button ID="Cancel" runat="server" Text="Cancel" /> 
                                    <br /> 
                                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("JobNumber") %>'></asp:Label> 
                                </div> 
                            </EditItemTemplate> 
                            <Columns> 
                                <telerik:GridEditCommandColumn> 
                                </telerik:GridEditCommandColumn> 
                                <telerik:GridCheckBoxColumn DataField="Approved" DataType="System.Boolean"   
                                    HeaderText="Approved" SortExpression="Approved" UniqueName="Approved"   
                                    Visible="False">  
                                </telerik:GridCheckBoxColumn> 
                                <telerik:GridCheckBoxColumn DataField="Rejected" DataType="System.Boolean"   
                                    HeaderText="Rejected" SortExpression="Rejected" UniqueName="Rejected"   
                                    Visible="False">  
                                </telerik:GridCheckBoxColumn> 
                                <telerik:GridBoundColumn DataField="Notes" HeaderText="Notes"   
                                    SortExpression="Notes" UniqueName="Notes" Visible="False">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="DictatorID" HeaderText="DictatorID"   
                                    ReadOnly="True" SortExpression="DictatorID" UniqueName="DictatorID">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="JobNumber" DataType="System.Int32"   
                                    HeaderText="JobNumber" ReadOnly="True" SortExpression="JobNumber"   
                                    UniqueName="JobNumber">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Juvenile" DataType="System.Double"   
                                    HeaderText="Juvenile" ReadOnly="True" SortExpression="Juvenile"   
                                    UniqueName="Juvenile">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Stat" DataType="System.Int16"   
                                    HeaderText="Stat" ReadOnly="True" SortExpression="Stat" UniqueName="Stat">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Case #" HeaderText="Case #" ReadOnly="True"   
                                    SortExpression="Case #" UniqueName="Case #">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Date Dictated" DataType="System.DateTime"   
                                    HeaderText="Date Dictated" ReadOnly="True" SortExpression="Date Dictated"   
                                    UniqueName="Date Dictated">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Dictating Officer"   
                                    HeaderText="Dictating Officer" ReadOnly="True"   
                                    SortExpression="Dictating Officer" UniqueName="Dictating Officer">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Date Typed" DataType="System.DateTime"   
                                    HeaderText="Date Typed" ReadOnly="True" SortExpression="Date Typed"   
                                    UniqueName="Date Typed">  
                                </telerik:GridBoundColumn> 
                            </Columns> 
                            <EditFormSettings EditFormType="Template">  
                                <EditColumn UniqueName="EditCommandColumn1">  
                                </EditColumn> 
                            </EditFormSettings> 
                        </MasterTableView> 
                        <ClientSettings> 
                            <Selecting AllowRowSelect="True" /> 
                        </ClientSettings> 
                    </telerik:RadGrid> 

3 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 20 Apr 2009, 04:18 PM
Never Mind I was using itemedittemplate instead of Mastertableviewedit Template
0
Divya
Top achievements
Rank 1
answered on 24 Jun 2013, 06:42 AM
Hi,
 I am facing same problem.Can you please tell me how did you fixed?
0
Princy
Top achievements
Rank 1
answered on 24 Jun 2013, 08:50 AM
Hi Divya,

 I'm not sure about your requirements.Please try setting EditFormType="AutoGenerated". If this doesn't help,please provide your code.

ASPX:
<EditFormSettings EditFormType="AutoGenerated"
   <EditColumn UniqueName="EditCommandColumn1"
   </EditColumn>
</EditFormSettings>

Thanks,
Princy
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Divya
Top achievements
Rank 1
Princy
Top achievements
Rank 1
Share this question
or