Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with AddRange and DataGridView
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01378089
Message ID:
01380004
Vues:
25
>Thanks Viv - I still don't understand completely - maybe one day ?

Probably because I'm lousy at explaining things.

The AddRange method accepts an array of type DataGridViewColumn (or any class derived therefrom)
You are creating an array of type PJKBaseDataGridViewColum - so far so good since it IS derived from DataGridViewColumn.
But the first item in the array (Column1) is of type PJBaseDataGridViewTextBoxColumn.
This is derived from the Windows.DataGridViewTextBoxColumn NOT PJKBaseDataGridViewColum.
Therefore it can't be added to the array.
If you derive PJBaseDataGridViewTextBoxColumn from PJKBaseDataGridViewColum instead all should be well.
Alternatively if you create an array of type Windows.DataGridViewColumn that should also work.

Dang, I don't think that's any clearer either :-{

How's the snow with you?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform