ASP gridview error

On te below code i have a error whats not good ?

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Type 'System.Web.UI.WebControls.GridView' does not have a public property named 'EditItemTemplate'.

Source Error:


Line 128:
Line 129:
Line 130:   <EditItemTemplate >     
Line 131:      <asp:DropDownList ID="BB_projectenId" runat="server"  
Line 132:          DataSourceID="SQLDataSource55" DataTextField="DataType" DataValueField="BB_name"  


Thanks for helping my out.
   <EditItemTemplate >      
      <asp:DropDownList ID="BB_projectenId" runat="server"   
          DataSourceID="SQLDataSource55" DataTextField="DataType" DataValueField="BB_name"   
          SelectedValue='<%# Bind("BB_projectenId") %>'>  
     </asp:DropDownList>  
  </EditItemTemplate> 

Open in new window

GerardkAsked:
Who is Participating?
 
apexpertCommented:
Previoust comment was example take this one:
<asp:TemplateField>
<EditItemTemplate >     
      <asp:DropDownList ID="BB_projectenId" runat="server"  
          DataSourceID="SQLDataSource55" DataTextField="DataType" DataValueField="BB_name"  
          SelectedValue='<%# Bind("BB_projectenId") %>'>  
     </asp:DropDownList>  
  </EditItemTemplate>  
</asp:TemplateField>
0
 
Jon500Commented:
What is outside your EditItemTemplate tag? Is it contained in a Columns tag of your GridView tag?

Regards,
Jon500
0
 
GerardkAuthor Commented:
This is te complete code off te gridview.

Greating Gerard
  <asp:gridview id="CustomersGridView" 
GridLines="Both"
	cellpadding="1"
	cellspacing="1"
	Headerstyle-BackColor="#5874A6"
	Headerstyle-Forecolor="#FFFFFF"
	Headerstyle-Font-Names="Arial"
	Headerstyle-Font-Bold="True"
	Headerstyle-Font-Size="11"
	BackColor="#FFCC66"
	Font-Names="Arial"
	Font-Size="10"
	AlternatingRowStyle-BackColor="#FFFFCC"
	AlternatingRowStyle-Font-Names="Arial"
	AlternatingRowStyle-Font-Size="10"
	BorderColor="Black"
      AllowSorting="true" 
      OnRowDataBound="doColor" 
 
         AllowPaging="true" 
         AutoGenerateColumns="False"
         datasourceid="CustomersSqlDataSource" 
         autogenerateeditbutton="true" 
         datakeynames="bb_urenregistratieid"  
         runat="server" 
         Width=950>
           
         <Columns>
       
       
 
   <EditItemTemplate >      
      <asp:DropDownList ID="BB_projectenId" runat="server"   
          DataSourceID="SQLDataSource55" DataTextField="DataType" DataValueField="BB_name"   
          SelectedValue='<%# Bind("BB_projectenId") %>'>  
     </asp:DropDownList>  
  </EditItemTemplate>   
         
         <asp:hyperlinkfield  ItemStyle-Width=40 ItemStyle-Font-Size=XX-Small  target="_blank"  headertext="BDREF"
            datatextfield="bdref"
            datanavigateurlformatstring="http://crm/BlueDome/userdefined/edit.aspx?id={0}&etc=10017#"
            datanavigateurlfields="bb_urenregistratieid" />
                     


                        <asp:BoundField DataField="BB_Billable" ItemStyle-BackColor=White    HeaderStyle-Font-Bold="true"   HeaderText="Bilable" 
                       SortExpression="BB_Billable" >
                       



        
<HeaderStyle Font-Bold="True"></HeaderStyle>

<ItemStyle BackColor="White"></ItemStyle>
                </asp:BoundField>
                       
                       
             
                           
                           
                           
                                           
                <asp:BoundField  ItemStyle-Width=50  ItemStyle-Font-Size=XX-Small DataField="BB_Datum" HeaderText="Date"  HeaderStyle-Font-Bold="true" 
                       ReadOnly="True" SortExpression="BB_Datum" >
<HeaderStyle Font-Bold="True"></HeaderStyle>

<ItemStyle Font-Size="XX-Small" Width="50px"></ItemStyle>
                </asp:BoundField>


                <asp:BoundField ItemStyle-Font-Size=XX-Small DataField="TimeUsed" HeaderText="TimeUsed"  HeaderStyle-Font-Bold="true" 
                       ReadOnly="True" SortExpression="TimeUsed" >
<HeaderStyle Font-Bold="True"></HeaderStyle>

<ItemStyle Font-Size="XX-Small"></ItemStyle>
                </asp:BoundField>
       
                
                <asp:BoundField ItemStyle-Font-Size=XX-Small DataField="New_Durationorig" HeaderText="TimeUsed"  HeaderStyle-Font-Bold="true" 
                       ReadOnly="False" SortExpression="New_Durationorig" >
<HeaderStyle Font-Bold="True"></HeaderStyle>

<ItemStyle Font-Size="XX-Small"></ItemStyle>
                </asp:BoundField>
                
         <asp:hyperlinkfield  target="_blank"  headertext="Ticket#"
            datatextfield="bb_supporttrioid"
            datanavigateurlformatstring="https://servicedesk.bluedome.net/admin/main.php?action=view_ticket&id={0}"
            datanavigateurlfields="bb_supporttrioid" />

              
                <asp:BoundField ItemStyle-Width=150 ItemStyle-Font-Size=XX-Small DataField="BB_werkzaamhedenName" HeaderText="Service" 
                    HeaderStyle-Font-Bold="true"  ControlStyle-Width="250"  
                       SortExpression="BB_werkzaamhedenName"  ReadOnly="True">                       
<ControlStyle Width="250px"></ControlStyle>

<HeaderStyle Font-Bold="True"></HeaderStyle>

<ItemStyle Font-Size="XX-Small" Width="150px"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-Width=150 DataField="BB_name" HeaderText="Name" 
                    HeaderStyle-Font-Bold="true"  ControlStyle-Width="300"  ControlStyle-Height="40"    
                       SortExpression="BB_name" >
<ControlStyle Height="40px" Width="300px"></ControlStyle>

<HeaderStyle Font-Bold="True" Wrap=true ></HeaderStyle>

<ItemStyle Width="150px"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField ItemStyle-Width=400  DataField="bb_extraomschrijving" HeaderStyle-Font-Bold="true"  
                    ControlStyle-Width="400" ControlStyle-Height="40"   
                       HeaderText="Description"  
                       SortExpression="bb_extraomschrijving" >                       
<ControlStyle   Height="40px" Width="300px"></ControlStyle>

<HeaderStyle Font-Bold="True"></HeaderStyle>

<ItemStyle Width="400px"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField  ItemStyle-Width=100 ItemStyle-Font-Size=XX-Small DataField="owneridname" HeaderStyle-Font-Bold="true"  HeaderText="User"  
                       ReadOnly="True" SortExpression="owneridname"  >
<HeaderStyle Font-Bold="True"></HeaderStyle>

<ItemStyle Font-Size="XX-Small" Width="100px"></ItemStyle>
                </asp:BoundField>

            </Columns>



      </asp:gridview>

Open in new window

0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Jon500Commented:
All EditItemTemplate tags must be in TemplateField tags. Same goes for ItemTemplate tags...

Does that help?

Regards,
Jon500
0
 
apexpertCommented:
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="txt" Text='<%#Eval("Description")%>' runat="server" ></asp:TextBox>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtedname" runat="server" Text='<%#Eval("Description")%>' ></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
0
 
GerardkAuthor Commented:
good advise thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.