Re: GridView basics

Tech-Archive recommends: Speed Up your PC by fixing your registry



RowDataBound event is good for formatting.You can format based either on the
output text (e.Row.Cells collection) or on the data as they come from
database (e.Row.DataItem). In the latter case you need to typecast the data
item to the correct class.

I would prefer to join the tables in the same select statement, even if you
end up with a bulky sql.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Peter Laman" <peter.laman@xxxxxxxxx> wrote in message
news:4c9b73dd-513d-41ac-a662-96ca931ddb2f@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello, here are some basic GridView questions. I'm using a GridView in
Visual Web Developer to display data from an SQLServer database. I use
C# as programming language.

- How can I format the text in a column. I'm looking for some event
handler that takes the value from the database and formats it for
rendering it on the webpage. Is using a TemplateField the right
direction?
- Some columns in the query contain codes that should be looked up in
lookup tables. I don't want to join all of those tables in the query,
but look them up at display time and render the description in stead
of the code. Is there a typical precooked way to do this?


.



Relevant Pages

  • Re: Protel 2004 answer to Brad Velander.
    ... Sorry, you misunderstand me, I mean to say that jump from 99SE to 2004 XP ... you don't have the same format with one database will all the documents. ... Well you said that you can export file format more recent than AUTOCAD 14 ... key/mouse click you press because I don't know how to do that with Protel ...
    (sci.electronics.cad)
  • Re: Combo box not finding record... sometimes
    ... Try the Format option last. ... Private Sub cboLnNum_AfterUpdate ... when I change the data type from Double to Long Integer the database ...
    (microsoft.public.access.formscoding)
  • Re: Error Message: Cant find Installable ISAM
    ... The database is residing on my machine, ... Error Message = "Couldn't find Installable ISAM" ... Connect property set = Access ... Access 2002/2003 format and tried this as a possibility, ...
    (microsoft.public.vb.database)
  • Re: What program is best for large inventory?
    ... put the information in the format that I want. ... down into several sub groups and some even further. ... The learning curve for general database concepts is moderate. ...
    (microsoft.public.office.misc)
  • Re: Acc97 Recordsets vs Acc2000/2002
    ... Microsoft DAO 3.6 Library ... Uncheck everything else except the 2 required libraries. ... Access 2002 can save the database back to A97 format if needed. ...
    (microsoft.public.access.modulesdaovba)