Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am quite confuse why my code does not accept any gridview properties like

OnRowDataBound = "gdPartReg_RowDataBound"
OnRowDeleting = "gdPartReg_RowDeleting"
OnRowCreated = "gdPartReg_RowCreated"

and etc..

How to solve this?

This is my page directive :
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site1.Master" CodeBehind="InternalRegis.aspx.vb" Inherits="QFMSWeb.InternalRegis" %>


This is header of code behind
VB
Public Class InternalRegis
    Inherits System.Web.UI.Page


I have changed
Inherits="QFMSWeb.InternalRegis"
to
Inherits="InternalRegis"
but it cannot load the page. For your info, InternalRegis.aspx is in Forms folder. Does it has anything to do with this?

Edit ----

This is gridview code:
ASP.NET
<asp:GridView ID="gdShop" runat="server" AutoGenerateColumns="False"
                               BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px"
                               CellPadding="4" CellSpacing="2" ForeColor="Black" Width="430px" OnRowCreated="gdPartReg_RowCreated" OnRowDeleted = "gdPartReg_RowDeleting">
                               <columns>
                                   <asp:TemplateField>
                                       <itemtemplate>
                                           <asp:CheckBox ID="cbSH" runat="server" />
                                       </itemtemplate>

                                   <asp:BoundField DataField="DEPT" HeaderText="Dept" />
                                   <asp:BoundField DataField="EMPID_T" HeaderText="Emp. ID" />
                                   <asp:BoundField DataField="NAME_T" HeaderText="Name" />
                               </columns>
                               <footerstyle backcolor="#CCCCCC" />
                               <HeaderStyle BackColor="Black" BorderColor="White" Font-Bold="True"
                                   ForeColor="White" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                               <pagerstyle backcolor="#CCCCCC" forecolor="Black" horizontalalign="Left" />
                               <rowstyle backcolor="White" />
                               <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                               <sortedascendingcellstyle backcolor="#F1F1F1" />
                               <sortedascendingheaderstyle backcolor="#808080" />
                               <sorteddescendingcellstyle backcolor="#CAC9C9" />
                               <sorteddescendingheaderstyle backcolor="#383838" />
Posted
Updated 9-Aug-12 17:54pm
v4
Comments
Abdul Quader Mamun 9-Aug-12 23:09pm    
check, Have you used any namespace?
Abdul Quader Mamun 9-Aug-12 23:11pm    
Where is the full code?
snamyna 9-Aug-12 23:30pm    
Sorry..I just edit the question. I didnt attach the code behind as I can't view the aspx yet.

1 solution

Have you checked is there any more cs page which inherits the same class.

Thanks
Ashish
 
Share this answer
 

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