This project has moved and is read-only. For the latest updates, please go here.
1

Closed

DataColumn with the columnName consisting with numbers throws exception

description

Exception is thrown using DataColumn with the columnName with numbers DataColumn dc = new DataColumn("913", "First Name", true, true, true, true) and adding row then dr["913"] = "link";
 
The exception is "Invalid Binding path; character 9 in 913";
Closed Jan 5, 2011 at 7:04 PM by gamosoft

comments

gamosoft wrote Jan 5, 2011 at 7:03 PM

Hi there, unfortunately the way it works now is that it creates properties using reflection at runtime, and property names (as well as all C# identifiers) can't be named using only numbers [url:http://msdn.microsoft.com/en-us/library/aa664670(v=vs.71).aspx], so it can only start by letters or the underscore character.

However, as you can see you can define the caption of the column to whatever text you want.

HTH.
Regards.

wrote Jan 5, 2011 at 7:04 PM

wrote Feb 14, 2013 at 3:14 AM

wrote May 16, 2013 at 8:41 AM