Click here to Skip to main content
13,148,549 members (67,555 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Cannot implicitly convert type 'string' to 'System.Windows.Forms.DataGridViewTextBoxColumn'	D:\abc folder\XXX.designer.cs

can u help me how to resolve this error..

the error is showing in the below line

this.Name = "xxx";
Posted 28-Jun-12 0:53am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Try :
this.Name.Text = "xxx";
Rahul Rajat Singh 28-Jun-12 7:07am
Mehdi Gholam 28-Jun-12 7:16am
CHill60 5-Jul-13 13:54pm
I tried this in Visual C# 2010 Express and still got compile errors
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I encountered the same issue and found the problem. The error was caused by having a DataGridView column named 'Name'. Changing the column name from 'Name' to something else fixed the problem.
CHill60 5-Jul-13 13:53pm
My +5 - this solution does actually work - and of course Reserved Words should be avoided anyway. I couldn't get solution 1 to work at all.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170924.2 | Last Updated 5 Jul 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100