473,385 Members | 1,472 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,385 software developers and data experts.

Cannot implicitly convert to 'System.Windows.Forms.ColumnHeader'

hi all
i m creating a window application and i used a listview control in a window's form. But when i try to build that application then the following error prompts :

Cannot implicitly convert type 'string' to 'System.Windows.Forms.ColumnHeader'

i m not able the understand what is the problem.
Feb 15 '07 #1
3 18524
hi all
i m creating a window application and i used a listview control in a window's form. But when i try to build that application then the following error prompts :

Cannot implicitly convert type 'string' to 'System.Windows.Forms.ColumnHeader'

i m not able the understand what is the problem.
I had the same problem. One of my columns was named "Name". I changed it to "Name_col" and the problem disappeared. Using "Name" conflicted with an existing member.
Apr 2 '07 #2
SammyB
807 Expert 512MB
hi all
i m creating a window application and i used a listview control in a window's form. But when i try to build that application then the following error prompts :

Cannot implicitly convert type 'string' to 'System.Windows.Forms.ColumnHeader'

i m not able the understand what is the problem.
Please show us the line of code and several lines before & after. It sounds like you just need to use the Text property.
columnHeader1 = "Desc" would give you that error. Use
columnHeader1.Text = "Desc"
Apr 2 '07 #3
Wint
1
Please show us the line of code and several lines before & after. It sounds like you just need to use the Text property.
columnHeader1 = "Desc" would give you that error. Use
columnHeader1.Text = "Desc"
I got this error too, it was choking on the this.name = "frmMain"; line when initializing the windows form. Turns out a control inside that form, a ListView, had a column that I had named "Name". Changing that to something else allowed the project to build without errors. Any idea why?
Mar 1 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Terminal882003 | last post by:
Hi, Here I have a question about MSCommLib. I need to dynamically add activeX controls that requires run-time license for MSCommLib. The following is the actual code: AxMSCommLib.AxMSComm...
22
by: Christoph Boget | last post by:
I am getting an error (a few among many) for the following lines of code: retval.BrokerName = (( curRow == System.DBNull.Value ) ? SqlString.Null : (string)curRow ); retval.BrokerGroupId = ((...
6
by: juli | last post by:
I declared: public delegate void PaintEventHandler(object objSender,PaintEventArgs pea); and this.Paint+=new PaintEventHandler(MyPaintHandler); and the: static void MyPaintHandler(object...
9
by: Andy Sutorius | last post by:
Hi, I am receiving the error when compiling the project, "cannot implicitly convert type object to string". The error points to this line of code and underlines the dtrRecipient:...
3
by: Patrick Olurotimi Ige | last post by:
compiling the code below i get the error:- Cannot implicitly convert type 'object'to 'System.Xml.XmlDocument' I'm getting the error on this line:- myXml.Document =...
7
by: Alex | last post by:
Hi, I'm completely new to C#, so here is my question: Why my C# program (COM dll which I can call from C++ application) cannot see namespace System.Windows.Forms.. When I'm typing in...
0
by: Qiang | last post by:
Anybody knows how to convert convert System.Windows.Forms.HtmlDocument to String? Any API or sample code will be greatly appreciated. thanks, Qiang
2
by: ransaj | last post by:
objCompanyRequirement.Salary = Convert.ToInt32 (txtCRF_Salary.Text); cannot implicitly convert type 'int' to 'string' objCompanyRequirement.InterviewDate = ...
4
by: clflyer | last post by:
I have a small problem. I'm pretty much a newbie to C# coming out of VB.Net. I have a windows form that has a GroupBox named grpSoldTo. I want to be able to clear all the textboxes and comboxes...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.