Jump to content

gridview fields


betul

Recommended Posts

Hello,I have a grid with custom columns Name, Address, and a select field (link button). In DB table fields are ; ID, Name, Address and Image. I have created an image field to show a different image for each record when it is selected. The code in grid_SelectedIndexChanged is ; int selectedRowIndex; selectedRowIndex = grid.SelectedIndex; GridViewRow row = grid.Rows[selectedRowIndex]; string image = row.Cells[2].Text; branchMap.ImageUrl = "~/images/" + image ; However it doesn't work if I dont put Image field in the grid. I don't want to show this field because it is useless (to show something like record1.jpg in the grid.) Is there any simple way to do that without writing a new DB connection? Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...