Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mapping a column in my datagrid
Message
De
22/10/2007 10:33:18
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
 
 
À
22/10/2007 07:30:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01261886
Message ID:
01262566
Vues:
16
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform