Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change value to be displayed in mmDataGridView
Message
 
À
10/07/2008 18:54:00
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01328179
Message ID:
01330462
Vues:
20
>Once your business object and entity object are created I would think you could add a property to your entity that gives you what you want. Bind >that property to your column instead of the actual column. You would have to do the plumbing in the get and set to get the value from the >actual property and back in again, but not a big deal.
>Tim

Hi Tim

My first idea was to use entity object, that would be my best solution if it would work, so to not mess with SQL view or functions, but it's not working...

For testing I edited the "BOEntity.cs" and added a new property like this:

public string DoneYesNo
{
get { return "yes"; }
set { this._doneYesNo = value; }
}
private string _doneYesNo;

The column DataPropertyName I set to DoneYesNo (this is not a field from the table)...
I expected that this grid column would be filled with "yes" in every row, but instead it's blank...

For further testing I changed an existing properties from a table field and changed it's get to return "yes", so that instead of the real value of that field I get the column filled with "yes", but again it's not working, I'm getting the original value from the table...

Seems that the DataGridView reads the DataSet not the EntityList (I'm using the MM.NET with entitycentric==true)
---------------------------
Maurizio Domba
CRON d.o.o. Rovinj, Croatia
http://wanip.info
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform