Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mapping a column in my datagrid
Message
From
22/10/2007 10:33:18
 
 
To
22/10/2007 07:30:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01261886
Message ID:
01262566
Views:
15
Thanks Cetin,

By looking at your example I was able to add new columns and bind them.
Here is the code
grdPolicyChangesNotes.AutoGenerateColumns = false;
grdPolicyChangesNotes.DataSource = dsData;
grdPolicyChangesNotes.DataMember = "PolicyNotes";

DataGridViewTextBoxColumn colDateEntered = new DataGridViewTextBoxColumn();
colDateEntered.HeaderText = "Date Entered";
colDateEntered.DataPropertyName = "Entered_dt";
grdPolicyChangesNotes.Columns.Add(colDateEntered);

DataGridViewTextBoxColumn colEffDate = new DataGridViewTextBoxColumn();
colEffDate.HeaderText = "Eff. Date";
colEffDate.DataPropertyName = "edate";
grdPolicyChangesNotes.Columns.Add(colEffDate);

DataGridViewTextBoxColumn colUser = new DataGridViewTextBoxColumn();
colUser.HeaderText = "User";
colUser.DataPropertyName = "entered_by";
grdPolicyChangesNotes.Columns.Add(colUser);
As you can see I added 3 columns, two columns are bind to data of datetime type and the 3rd to string type.

How do I format the columns to display only the date part?????. I do not want to show the time part.

Thanks,
Serigo
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform