473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

error setting headerimageurl in asp:TemplateColumn

Hi guys,
i have the following code in Datagrid:
<asp:TemplateColumn HeaderText="Delete"
headerImageUrl=../../Images/i.p.delete.gif">
<ItemTemplate>
<asp:CheckBox ID=Chk1 Enabled="True" runat="server" />
</ItemTemplate>
</asp:TemplateColumn>

when i run the page, i get the following error:

System.Web.UI.WebControls.DataGridColumnCollection must have items of type
'System.Web.UI.WebControls.DataGridColumn'. 'ItemTemplate' is of type
'System.Web.UI.HtmlControls.HtmlGenericControl'.

Can someone tell me whats wrong and how to fix it?

Thanks
Manny

Nov 18 '05 #1
1 1505
Your missing the opening double quote on headerImageUrl attribute.

<asp:TemplateColumn HeaderText="Delete"
headerImageUrl="../../Images/i.p.delete.gif">

-Chris

"Manny Chohan" <Ma*********@discussions.microsoft.com> wrote in message
news:56**********************************@microsof t.com...
Hi guys,
i have the following code in Datagrid:
<asp:TemplateColumn HeaderText="Delete"
headerImageUrl=../../Images/i.p.delete.gif">
<ItemTemplate>
<asp:CheckBox ID=Chk1 Enabled="True" runat="server" />
</ItemTemplate>
</asp:TemplateColumn>

when i run the page, i get the following error:

System.Web.UI.WebControls.DataGridColumnCollection must have items of type
'System.Web.UI.WebControls.DataGridColumn'. 'ItemTemplate' is of type
'System.Web.UI.HtmlControls.HtmlGenericControl'.

Can someone tell me whats wrong and how to fix it?

Thanks
Manny

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Das | last post by:
Hi All I'm using Temple column in Asp.Net if works fine, but I directly want to set the checked property. With Text Property: it works fin <asp:TemplateColumn HeaderText="Red...
1
by: Stephen | last post by:
I have the following asp:checkbox as a row in my datagrid. and im trying to write code on the onCheckedChanged event of it. The code im trying to write is incorrect as im getting build errors....
0
by: Tim::.. | last post by:
I keep getting the following error on a dropdownlist control I have added to a datagrid! I have given the control the correct id and don't get any errors when conpiling the code but as soon as I try...
5
by: Patrick.O.Ige | last post by:
What could cause the error:- System.NullReferenceException: Object reference not set to an instance of an object. Any ideas?
1
by: Patrick Olurotimi Ige | last post by:
I want to add a HeaderText="Subject" and HeaderImageUrl="" to a Datagrid but it seems it doesn't work! It seems If i specify both header text and a header image, the header image takes...
3
by: tjonsek | last post by:
am working on code that will allow users to update data within the datagrid. I have come across a few problems, some of them I have been able to work out, but this last one is giving me trouble. ...
2
by: Charleees | last post by:
Hi all, I have a DataGrid with Template Columns..... There are LAbels,Linkbuttons in the Single Row.. I have to set the Constant Column width for those Template Columns in Grid... Wat...
0
by: Rocky | last post by:
Dear ALL, I am facing a bit problem in DATAGRID. so may be you guys can help me out. Actually on a DataGrid I am having following controls: 1) 2 DropDown Menu 2) 1 Text Box 3) 1 ADD Button 4)...
3
by: rn5a | last post by:
A DataGrid has the following TemplateColumn: <asp:DataGrid ID="dgCart"...OnSortCommand="SortGrid" AllowSorting="true"....> <Column> <asp:TemplateColumn HeaderImageUrl="Images\Up.gif"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.