image and text in a cell in girdview

Posted by Deepakji under C# on 4/7/2012 | Points: 10 | Views : 2579 | Status : [Member] | Replies : 11
hi,
In my project i have some question ok that are save in database now database has two table where one contains the text and other has an image related to that text now i am using grid view to display it so now in a cell i need both text and image can anybody let me know how to do that its urgent. Thank you,




Responses

Posted by: Veerac85 on: 4/9/2012 [Member] Starter | Points: 25

Up
0
Down
You can achieve this by using http handler.

You will find omplete example at this link.

http://technico.qnownow.com/2012/04/09/display-images-from-database-in-asp-net-gridview-using-httphandler/


Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/9/2012 [Member] Bronze | Points: 25

Up
0
Down
Deepakji


Use ItemTemplate

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 4/9/2012 [Member] Starter | Points: 25
Posted by: Patel28rajendra on: 4/9/2012 [Member] Starter | Points: 25
Posted by: Hariinakoti on: 4/9/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Deepak,
this link is very useful to u.

http://www.eggheadcafe.com/community/csharp/2/10117222/showing-image-and-text-in-a-gridview-column.aspx

Thanks & Regards
Hari

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 4/10/2012 [Member] Starter | Points: 25
Posted by: Patel28rajendra on: 4/10/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

even more with nice example

http://msdn.microsoft.com/en-us/library/aa479350.aspx

R D Patel

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/10/2012 [Member] Bronze | Points: 25

Up
0
Down
Refet This Link


http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/fbd18553-a1b3-4fda-aada-ed7e73da7b96/

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/10/2012 [Member] Bronze | Points: 25

Up
0
Down
Refer This Link
http://www.eggheadcafe.com/community/csharp/2/10117222/showing-image-and-text-in-a-gridview-column.aspx


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/10/2012 [Member] Bronze | Points: 25

Up
0
Down
GridViewRow row = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Normal);

TableCell cell = new TableCell();
cell.BackColor = Color.Coral;
cell.ForeColor = Color.White;
cell.ColumnSpan = 12;
cell.HorizontalAlign = HorizontalAlign.Center;
cell.Controls.Add(img);
cell.Text = "PUBLISHER : "+projectDisplay.ToUpper();
row.Cells.Add(cell);

cell.Controls.Add(img);
cell.Text = "PUBLISHER : "+projectDisplay.ToUpper();


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/10/2012 [Member] Bronze | Points: 25

Up
0
Down



I Think You Expecting This


http://lichao.net/eblog/how-to-conditionally-display-image-in-gridview-based-on-data-fields-in-aspnet-20-20071090.html#

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response