Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
C#
'System.Web.UI.WebControls.Panel' does not contain a definition for 'EditIndex' and no extension method 'EditIndex' accepting a first argument of type 'System.Web.UI.WebControls.Panel' could be found (are you missing a using directive or an assembly reference?)



coding:
C#
protected void OnRowEditing(object sender, GridViewEditEventArgs e)
    {
        pnlGrid.EditIndex = e.NewEditIndex;
        this.DataBind();
    }
Posted
Comments
Sergey Alexandrovich Kryukov 22-Jan-16 23:44pm    
This is simple. There is no such thing as System.Web.UI.WebControls.Panel.EditIndex. This must be just your fantasy. Indeed, it's hard to imaging what such thing would do in Panel class.
The question simply makes no sense. Apparently, if you write some arbitrary non-existing class member, the code won't compile. :-)
That's all.
—SA
Member 12081616 23-Jan-16 0:09am    
This is HTML code:

<asp:Panel runat="server" ID="pnlGrid" Visible="true" OnRowEditing="OnRowEditing" OnRowDeleting ="delete" OnRowUpdating = "Update">
<div class="customscroll table-responsive">
<table class="table noborder stu par table-hover">
<tbody>
<asp:Repeater runat="server" ID="rptPast">
Herman<T>.Instance 26-Jan-16 9:51am    
Panel should be GridView

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900