Column Update Cancel buttons disappear on databinding

L

LouV

I created an application with a datagrid that allows users to place an
entire column in edit mode. There is also a hyperlink column that
allows them to drilldown to a more detailed datagrid.

The editable columns are template columns and I defined edit, update
and cancel buttons for the template column's footer. Initially, the
edit button is visible in the footer. When the edit button is
clicked, every cell in the column hides its label and unhides a
textbox through the itemcreated event so that the column is in edit
mode. In the itemcommand event, I hide the edit button in the footer
and display the update and cancel buttons. This works very well and I
am able to change the data and update the entire column.

I wanted to be able to stop users from clicking on the hyperlink
column while a column is in edit mode. So when the edit button is
clicked, I change the hyperlink url to a Javascipt alert command for
each row through the itemcreated event. But in order to get the alert
reflected in the datagrid, I need to bind the data. And the alert
works perfectly, clicking on the hyperlink displays a message telling
the user that drilldown is not allowed in edit mode. The problem is
when I bind the data, I lose the update and cancel buttons and the
edit button appears in the column that's in edit mode. If I don't
bind the data, the update and cancel buttons are there, but the
hyperlink column reflects the original url and not the javascript
alert command. It doesn't matter whether I place the databind command
before or after I make the update and cancel buttons visible. I can
confirm in debug mode that they are set to visible, yet they do not
appear.

Does anyone have any ideas how I can get this to work? Is there a
different approach I can take?
 

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

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top