I have a grid EditMode set to EditForms and EditColumnButtonType = ImageButton.
I want the Update and Cancel buttons change their images on mouse actions. For that I need to set a few clientside event like onmouseover etc. The problem is that I can't locate server side controls for the Update and Cancel buttons on edit form to set their attributes. I handle the ItemCreate or ItemDataBound event and have this code:
but it doesn't find any buttons. I tried also setting UniqueName for EditFormSettings.EditColumn and running efItem[uniqueName] to no avail.
I want the Update and Cancel buttons change their images on mouse actions. For that I need to set a few clientside event like onmouseover etc. The problem is that I can't locate server side controls for the Update and Cancel buttons on edit form to set their attributes. I handle the ItemCreate or ItemDataBound event and have this code:
| if (e.Item.IsInEditMode && (e.Item is GridEditFormItem)) |
| { |
| GridEditFormItem eefItem = e.Item as GridEditFormItem; |
| // set right images for buttons |
| ImageButton btnUpdate = efItem.FindControl("btnUpdate") as ImageButton; |
| if (btnUpdate != null) |
| { |
| } |
| ImageButton btnCancel = efItem.FindControl("btnCancel") as ImageButton; |
| if (btnCancel != null) |
| { |
| } |
| } |