Asp.Net Ajax - Problem referencing object to a ModalPopupExtender within a gridview row.
-
Hi. I couldn't find a forum for Ajax so I guess it falls under asp.net. :) I'm working on a timesheet control that consists of a gridview with a column for each day. The column consists of a textbox for working hour input and an imagebutton for entering a comment for the given day. I've been trying to add a ModalPopupExtender to the item template and to set the imagebutton ClientID to the extenders TargetControlID property. This is for displaying the input controls for the comment. Setting the imagebutton id to the TargetControlID property in the markup doesn't work as the imagebuttons id is dynamically created for each row when the gridview performs the databinding. I've been experimenting with the gridviews OnPreRender method where I iterate over the rows, locate the imagebutton and extender for the given row, and set the TargetControlID. I get a asp.net error stating: The TargetControlID of 'commentModalPopupExtender' is not valid. A control with ID 'ctl00_Main_timesheetControl_gvTimeSheet_ctl02_imBtnMondayComment' could not be found. As far as I know, that id looks exactly right according to what I've seen when I look at the source of the page. Anyone who've encountered (and solved) this problem? Best regards! Larantz
for those about to code, we salute youhttp://www.itverket.noPlease refer to the Forum Guidelines for appropriate posting.