?
Solved

ASP gridview error

Posted on 2010-01-05
8
Medium Priority
?
418 Views
Last Modified: 2012-08-13
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

0
Comment
Question by:Gerardk
  • 2
  • 2
  • 2
6 Comments
 
LVL 8

Expert Comment

by:Jon500
ID: 26185531
What is outside your EditItemTemplate tag? Is it contained in a Columns tag of your GridView tag?

Regards,
Jon500
0
 

Author Comment

by:Gerardk
ID: 26185564
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
 
LVL 8

Expert Comment

by:Jon500
ID: 26185625
All EditItemTemplate tags must be in TemplateField tags. Same goes for ItemTemplate tags...

Does that help?

Regards,
Jon500
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 4

Expert Comment

by:apexpert
ID: 26188121
<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
 
LVL 4

Accepted Solution

by:
apexpert earned 1500 total points
ID: 26188125
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
 

Author Closing Comment

by:Gerardk
ID: 31673212
good advise thank you
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question