Mar 09, 2017, 12:36 PM
[CLOSED] Datecolumn: Unable to cast object of type 'System.DateTime' to type 'System.String'
I have a sql table with a column [WelcomeSent] with type: Datetime and null values existing in this column
I have this code to get the values from my DB and store them in a grid:
Anyone know how I can fix that?
I have this code to get the values from my DB and store them in a grid:
var result = (from i in dc.vw_Users where i.id == id select i).ToList(); //error line
storeUsers.DataSource = result;
storeUsers.DataBind();
In my grid there is a column:<ext:DateColumn runat="server" ID="ColUsersWelcomeSent" DataIndex="WelcomeSent" Text="WelcomeSent" Width="80" Format="dd/MM/yyyy" Hidden="true"></ext:DateColumn>
But when I run it I receive this error:
Unable to cast object of type 'System.DateTime' to type
'System.String'
'System.String'
Last edited by fabricio.murta; Mar 09, 2017 at 2:04 PM.
Reason: [CLOSED]