|
Hi there, I am using an Ajax drop down extender control, which displays a grid when a text box is clicked.
In the rowdatabound event of the grid, I set the onclick event handler to set the selected row of the grid.
e.Row.Attributes[ "onclick"] = Page.ClientScript.GetPostBackClientHyperlink(FileGridView, "Select$" + e.Row.RowIndex);
This is then handled by the following event handler: protected void FileGridView_SelectedIndexChanged(object sender, EventArgs e) { txtFile.Text = FileGridView.SelectedRow != null ? Server.HtmlDecode(FileGridView.SelectedRow.Cells[1].Text) : ""; ProfileCommon profile = ""> if (FileGridView.SelectedRow == null) return;profile. User.ImportId = Convert.ToInt32(FileGridView.SelectedRow.Cells[0].Text);profile. Save();Response.Redirect( "~/Overview.aspx");}
The generated html from Firebug is :
<div>
<table id="ctl00_ctl00_loggedOnDropDown_importDropDown_FileGridView" class="FileGridViewClass" cellspacing="0" border="0" style="
border- color:Black;border-width:1px;border-style:Solid;border-collapse:collapse;">
<tbody>
<tr style="color:White;background-color:#F24B31;"> <tr style="background-color:#DDDDDD;" onmouseout="this.style.backgroundColor='#EEEEEE'" onmouseover="this.style.backgroundColor='#999999'" onclick="_javascript_:__doPostBack('ctl00$ctl00$loggedOnDropDown$importDropDown$FileGridView','Select$0')"
>
<td>
<span id="ctl00_ctl00_loggedOnDropDown_importDropDown_FileGridView_ctl02_importName">test 2</span> </td> <td>23.09.2008</td> <td align="center"> <td>12.09.2009</td> <td class="align-right">99</td> </tr> <tr style="background-color:#EEEEEE;" onmouseout="this.style.backgroundColor='#DDDDDD'" onmouseover="this.style.backgroundColor='#999999'" onclick="
_javascript_:__doPostBack('ctl00$ctl00$loggedOnDropDown$importDropDown$FileGridView','Select$1')"> </tbody> </table> </div>
To test this, I click on the grid row to try and trigger the onclick event.
<clickElement xpath="//span[contains(@id, '_importName') and contains(text(), 'test 2')]"/>
I get no errors calling the clickelement, but the onclick event does not seem to be getting called. No re-direct is occurring to reload the Overview page.
Does anyone have any ideas why this might be happening.
Kind regards
Sophie Sophie De Malet Roquefort
IT Department
0131 555 1100
Want to know more about data management? Download a whitepaper Do you work in the non-profit sector? Come to our free event. Please let me know if this e-mail address is not the best one to use.
This e-mail is intended for the named addressee only. Its contents are private and confidential and should not be read, copied or disclosed to or by any other person. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone (0131 555 1100), delete the contents of this transmission and destroy any copies made. Copyright Data Discoveries Limited. All rights reserved. No part of this communication may be reproduced without the prior written permission of Data Discoveries Limited.
Opinions, conclusions and other information in this message that do not relate to the official business of Data Discoveries Limited shall be understood as neither given nor endorsed by it. Internet e-mails are not necessarily secure. Data Discoveries Limited does not accept responsibility for changes made to this message after it was sent or viruses transmitted through this e-mail or any attachment. You should carry out your own virus checking procedure before opening any attachment to this e-mail. The e-mail and IT systems of Data Discoveries Limited are subject to random monitoring and recording by or on behalf of Data Discoveries Limited.
Thank you.
Data Discoveries Limited: Registered in Scotland with Registered Number SC157375.
Registered Office: 16/1 Timber Bush Edinburgh EH6 6QH. VAT Registration Number: GB 663 8176 09. Member of the Direct Marketing Association. |
- [Webtest] (no subject) lavanya palaniswamy
- RE: [Webtest] (no subject) David Jehoul
- [Webtest] (no subject) Kiwitz, Thomas
- Re: [Webtest] (no subject) Paul King
- [Webtest] (no subject) Mario Somrei
- Re: [Webtest] (no subject) Marc Guillemot
- Re: [Webtest] (no subject) Mario Somrei
- [Webtest] (no subject) Gert Pauwels
- Re: [Webtest] (no subject) Josep GarcĂa
- [Webtest] (no subject) Tokutan
- [Webtest] (no subject) Sophie De Malet Roquefort
- Re: [Webtest] (no subject) Lisa Crispin
- re[2]: [Webtest] (no subject) Sophie De Malet Roquefort

