Custom image links/rowcommands in a gridviews header?

J

jobs

two questions..

1. I'm having a problems changing the headerimageurl on the fly in the
code behind. In rowcreated, I have this code:

If e.Row.RowType = DataControlRowType.Header Then
If grid.EditIndex <> -1 Then
grid.Columns(0).HeaderImageUrl = "../App_Themes/
WinXP_Silver/Images/cancel.gif"

End If

I'm trying to use position 0,0 of the grid for NEW and Cancel.

but it causes error:

Column 'JobName' does not belong to table DefaultView.

JoName is the second column in the grid, the first (0), is buttonfield
that takes the row into editmode. The above errors is not happening in
that block of code.

Is it possible to change the headerimageUrl . If so where? and how?

2. Provided that it is, any way to use header images as command links
in my gridview?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top