hi we are using web user control with rad grid and getting following error is there any way to resolve this error
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditStudentDetails.ascx.cs" Inherits="AdminPortal.Admin.WebUserControl1" %><table> <tr> <td align="right" colspan="2"> <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" Visible='<%# Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'> </asp:Button> <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert" Visible='<%# (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'></asp:Button> <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </td> </tr></table><%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true" CodeBehind="StudentDetails.aspx.cs" Inherits="AdminPortal.Admin.StudentDetails" %><asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <%--<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />--%> <!-- content start --> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> <telerik:RadCodeBlock runat="server" ID="radCodeBlock"> <script type="text/javascript"> function showFilterItem() { $find('<%=RadGrid1.ClientID %>').get_masterTableView().showFilterItem(); } function hideFilterItem() { $find('<%=RadGrid1.ClientID %>').get_masterTableView().hideFilterItem(); } function RowDblClick(sender, eventArgs) { sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical()); } </script> </telerik:RadCodeBlock> <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True" DataSourceID="EntityDataSource1" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" CssClass="RadGrid"> <MasterTableView Width="100%" DataKeyNames="StudentID"> <Columns> <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="StudentID" DataType="System.Int32" HeaderText="StudentID" ReadOnly="True" SortExpression="StudentID" UniqueName="StudentID" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="StudentName" HeaderText="StudentName" SortExpression="StudentName" UniqueName="StudentName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ParentsName" HeaderText="ParentsName" SortExpression="ParentsName" UniqueName="ParentsName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Gender" HeaderText="Gender" SortExpression="Gender" UniqueName="Gender" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EmailId" HeaderText="EmailId" SortExpression="EmailId" UniqueName="EmailId"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PhoneNumber" HeaderText="PhoneNumber" SortExpression="PhoneNumber" UniqueName="PhoneNumber"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MobileNumber" HeaderText="MobileNumber" SortExpression="MobileNumber" UniqueName="MobileNumber"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" SortExpression="Subject" UniqueName="Subject" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="TimeZone" HeaderText="TimeZone" SortExpression="TimeZone" UniqueName="TimeZone"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address" UniqueName="Address"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country" UniqueName="Country" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="State" HeaderText="State" SortExpression="State" UniqueName="State" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City" UniqueName="City" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ZipCode" HeaderText="ZipCode" SortExpression="ZipCode" UniqueName="ZipCode" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SkypeId" HeaderText="SkypeId" SortExpression="SkypeId" UniqueName="SkypeId" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status" UniqueName="Status" Visible="false"> </telerik:GridBoundColumn> <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" /> </Columns> <EditFormSettings UserControlName="EditStudentDetails.ascx" EditFormType="WebUserControl"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> </EditFormSettings> <ExpandCollapseColumn ButtonType="ImageButton" Visible="False" UniqueName="ExpandColumn"> <HeaderStyle Width="19px"></HeaderStyle> </ExpandCollapseColumn> </MasterTableView> <ClientSettings> <ClientEvents OnRowDblClick="RowDblClick" /> </ClientSettings> </telerik:RadGrid> <%--<telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" DataSourceID="EntityDataSource1" AllowFilteringByColumn="True" AllowSorting="True" CssClass="RadGrid" GridLines="None" AllowPaging="True" PageSize="20" runat="server" EnableLinqExpressions="false" Width="500px" OnItemDeleted="RadGrid1_ItemDeleted" OnItemUpdated="RadGrid1_ItemUpdated" OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender"> <PagerStyle Mode="NextPrevAndNumeric" ShowPagerText="true" /> <GroupingSettings CaseSensitive="false" /> <MasterTableView AutoGenerateColumns="false" AllowFilteringByColumn="True" TableLayout="Auto" DataKeyNames="StudentID" DataSourceID="EntityDataSource1" EditMode="InPlace" ShowFooter="true"> <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <Columns> <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ButtonType="ImageButton" /> <telerik:GridEditCommandColumn> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="StudentID" DataType="System.Int32" HeaderText="StudentID" ReadOnly="True" SortExpression="StudentID" UniqueName="StudentID" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="StudentName" HeaderText="StudentName" SortExpression="StudentName" UniqueName="StudentName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ParentsName" HeaderText="ParentsName" SortExpression="ParentsName" UniqueName="ParentsName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Gender" HeaderText="Gender" SortExpression="Gender" UniqueName="Gender" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="EmailId" HeaderText="EmailId" SortExpression="EmailId" UniqueName="EmailId"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PhoneNumber" HeaderText="PhoneNumber" SortExpression="PhoneNumber" UniqueName="PhoneNumber"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MobileNumber" HeaderText="MobileNumber" SortExpression="MobileNumber" UniqueName="MobileNumber"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" SortExpression="Subject" UniqueName="Subject" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="TimeZone" HeaderText="TimeZone" SortExpression="TimeZone" UniqueName="TimeZone"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address" UniqueName="Address"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country" UniqueName="Country" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="State" HeaderText="State" SortExpression="State" UniqueName="State" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City" UniqueName="City" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ZipCode" HeaderText="ZipCode" SortExpression="ZipCode" UniqueName="ZipCode" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SkypeId" HeaderText="SkypeId" SortExpression="SkypeId" UniqueName="SkypeId" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status" UniqueName="Status" Visible="false"> </telerik:GridBoundColumn> </Columns> <EditFormSettings EditFormType="Template"> <FormTemplate> <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" style="border-collapse: collapse; background: white;"> <tr class="EditFormHeader"> <td colspan="2" style="font-size: small"> <b>Student Details</b> </td> </tr> <tr> <td> <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0" class="module"> <tr> <td> </td> <td> </td> </tr> <tr> <td> Country: </td> <td> <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("Country") %>'> </asp:TextBox> </td> </tr> <tr> <td> City: </td> <td> <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("City") %>' TabIndex="1"> </asp:TextBox> </td> </tr> <tr> <td> Region: </td> <td> <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("State") %>' TabIndex="2"> </asp:TextBox> </td> </tr> <tr> <td> Home Phone: </td> <td> <telerik:RadMaskedTextBox ID="HomePhoneBox" runat="server" SelectionOnFocus="SelectAll" Text='<%# Bind("PhoneNumber") %>' PromptChar="_" Width="300px" Mask="(###) ###-####" TabIndex="3"> </telerik:RadMaskedTextBox> </td> </tr> </table> </td> <td> <table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0" class="module"> <tr> <td> Address: </td> </tr> <tr> <td> <asp:TextBox ID="TextBox6" Text='<%# Bind("Address") %>' runat="server" TextMode="MultiLine" Rows="2" Columns="40" TabIndex="6"> </asp:TextBox> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <b>Personal Info:</b> </td> </tr> <tr> <td> <table id="Table4" cellspacing="1" cellpadding="1" width="250" border="0" class="module"> <tr> <td> Student Name: </td> <td> <asp:TextBox ID="TextBox2" Text='<%# Bind( "StudentName") %>' runat="server" TabIndex="8"> </asp:TextBox> </td> </tr> <tr> <td> Parent Name: </td> <td> <asp:TextBox ID="TextBox3" Text='<%# Bind( "ParentsName") %>' runat="server" TabIndex="9"> </asp:TextBox> </td> </tr> </table> </td> <td> </td> </tr> <tr> <td align="right" colspan="2"> <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'> </asp:Button> <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </td> </tr> </table> </FormTemplate> </EditFormSettings> </MasterTableView> <ClientSettings EnableRowHoverStyle="true"> <Selecting AllowRowSelect="True" /> <Scrolling AllowScroll="false" /> </ClientSettings> </telerik:RadGrid>--%> <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=AdminPortalEntities" DefaultContainerName="AdminPortalEntities" EnableDelete="True" EnableFlattening="False" EnableUpdate="True" EntitySetName="StudentInfoes"> </asp:EntityDataSource> <!-- content end --></asp:Content>