Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Figuring out what each cell means in GridView
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01335562
Message ID:
01335619
Vues:
16
Nice idea, thanks a lot. For now I don't need this anymore, since I was able to achieve my goal differently.

It's amazing, actually, how some simple things turn to be quite difficult in ASP.NET

>Do the Phone, City , etc columns have to be determined programmatically? If yes, maybe you could set page level int properties for the desired columns and then loop through the Header row of the gridview to see if the column name is the one you want then set the page property. Then, in your data row loop check to see if the current cell is one of the columns you want to set.
>
>>Hi everybody,
>>
>>I have this code
>>
>>for (int i = 4; i < e.Row.Cells.Count; i++)
>>            {
>>                e.Row.Cells[i].Attributes.Add("style", "word-wrap:break-word;width:70px");
>>            }
>>
>>However, I only want to execute this code for particular columns (Phone, City, etc.). Can I figure out which cell I'm in?
>>
>>Also is there something like INLIST or myValue IN (...) in C# if I want to check a value against number of items?
>>
>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform