|
-
July 20th, 2009, 03:23 AM
#1
DataGridView and custom columns
Hey,
Im currently writing a simple app to display some data from a list of objects. Each object has the following members:
- ID
- Name
- Description
- Image
- Value
Now i want to display Name, Description as normal columns, but i want the Image to display an Image, so ive made an DataGridViewImageColumn, but the problem is that the image member is not enough to load the image. There is a repository which is set within the appconfig that specifies where images should be loaded from, so it would need to load an image from:
Code:
string ImageUrl = string.format("{0}/{1}", ConfigurationManager.AppSettings["ImageRepo"], TheCurrentElementsImageMember);
Hope that makes sense, then the value i would ideally like to display in more custom way adding some styling to the cell and adding some other text in there, alot like the ItemTemplate in ASP...
Any advice on these topics would be great!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|