Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formatting DataGrid Column
Message
De
07/01/2004 14:32:14
 
 
À
07/01/2004 13:44:14
James Hansen
Canyon Country Consulting
Flagstaff, Arizona, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00864572
Message ID:
00864790
Vues:
14
Jim,
Sorry, I didn’t catch that you wanted to manipulate the data before displaying it. You might take a look at the Format and Parse events of the textbox in the column. Another approach could be a calculated column in the dataset! There’s lots of ways to do things in .Net and I have found that best practices are not yet clearly defined.

You will sadly discover, that things that were very easy in VFP, are a Pain in .Net and usually require lots of code. I'm working hard at develping some base classes that should make life easier in the future. The forums have been a great help.

Regards,

Terry Carroll


>Terry,
>
>Thanks for the reply.
>
>The problem with the formatting the data is that it is not as simple as applying a picture to the converted number. There are 60 seconds in a minute, not 100; 60 minutes in an hour. So, I have to do some calculation before I can apply a picture.
>
>I consider this first project primarily a learning experience, but this won't be the last time I have to do something like this. Even more often, I would like to covert an enumerated type or encoded value to a more user friendly string. In VFP I could just put a function in the Refresh method for the textbox. If I were building the datagrid in code without a framework, I can see how to do it when I set the data binding. Now I need to figure out how to do it using the framework to set the binding.
>
>The MM framework is a big help. After taking Kevin's class last month, I sat down and got my first app up with the a simple form accessing a VFP table via OLE DB in just a couple hours. So far, I've spent about 12 hours trying to figure out how to format two columns in a datagrid on that form. I've learned a lot about C# and .Net, but not how to do what I thought should be a simple task once I displayed the raw data.
>
>...Jim
>
>>Hi Jim,
>>
>>Join the club. I think the message I just posted will help: Thread ID 863988. "Adding a Combobox to a DataGrid". Note there is also a format property for the column style. Check out the .Net help by searching on "Custom DateTime Format Strings" to get a handle on how to define the format strings.
>>
>>Regards,
>>
>>Terry Carroll
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform