|
-
June 30th, 2005, 03:33 AM
#1
Displaying image in DataGrid
In Windows application, I hv associated the DataGrid to the DataSet, which has a Boolean column. Based on the Boolean value I need to display a image in datagrid. i.e. if the column value is true, first image should be displayed or if it is false second image should be displayed.
Any idea how to achieve this?
Thanks in adv
Venu
Venu Bharadwaj
"Dream it. U can do it!"
-
June 30th, 2005, 03:37 AM
#2
Re: Displaying image in DataGrid
Useful or not? Rate my posting. Thanks.
-
June 30th, 2005, 05:12 AM
#3
Re: Displaying image in DataGrid
In .NET 2003 there is no built in column style for images, you will need to implement one yourself by deriving from DataGridColumnStyle.
-
June 30th, 2005, 07:12 AM
#4
Re: Displaying image in DataGrid
This code helps in displaying the image exist in DB. In my scenario, i hv Boolean value in DB and based on this value i hv to display the image in datagrid.
any idea on this ?
thanks
Venu Bharadwaj
"Dream it. U can do it!"
-
June 30th, 2005, 07:41 AM
#5
Re: Displaying image in DataGrid
Where is the problem? You have only to reimplement the ExtractImageFromOleContainer() method of the DataGridImageClass in that example and your done. Or you have to replace this method-call in the paint methods by writing your own method. It is really easy.
I think you will not found an easier way without implementing it from the scratch.
Useful or not? Rate my posting. Thanks.
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
|