Target A GridViewRow With An AJAX.Net Toolkit PopupExtender?
Feb 19, 2010
I have a lot of data to display in a GridView. Because there's so much information per row, I'd like to be able to display additional information when a user clicks on the row, so I thought a PopupExtender from the AJAX Toolkit would be perfect.
Ideally, I want the popup to display whenever any of the controls within the row are selected. I've been able to successfully attach the PopupExtender to a single control within the row, but I can't get the pop-up to attach to the row itself.
I would have thought that setting the PopupExtender's TargetControlId to the Row's ClientID within the RowDataBound event would work, but when I do this I get a runtime error:
TargetControlID of 'popupExtId' is not valid. A control with ID 'gvList_ctl02' could not be found.
I noticed that the GridViewRow is rendered, the tr element does not include an id, so I also tried extending the GridView control to override the CreateRow method to render the id - using this method I was able to render the row's ID (e.g. gvList_ctl02), but the same runtime error was thrown when I added the PopupExtender back into the code.
I also tried binding the showPopup() javascript command to the row's onclick event to get the popup to display manually; whilst the click event is registered OK and is definitely triggered, the popup is still not shown.
Does anyone have any idea how to / if you can bind a PopupExtender to a GridViewRow?
My row bound code is as follows:
protected void gvList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
// Bind the popup extender's target ID to the row ID
// This will cause a runtime error
PopupControlExtender pop = e.Row.FindControl("popupExtId") as PopupControlExtender;
pop.TargetControlID = e.Row.ClientID;
// Also bind the client side click handler to try to get the popup to show
// The alert is triggered and no javascript error is generated, but the popup does not display
e.Row.Attributes.Add("onclick", "alert('Row Clicked'); $find('" + pop.BehaviorID + "').showPopup();");
}
}
View 1 Replies
Similar Messages:
Jul 29, 2010
When I click the button to open the modal popup it shows the popup but then continues and forces a postback causing the page to reload and the modal popup to be hidden again.Here is the markup for the control:
<asp:Button id="LoginOpenButton" runat="server" Text="Login"/>
<asp:Panel ID="ContentPanel" runat="server" CssClass="modalPopup">
<fieldset> [code]....
My script manager has no properties other than the id and runat set.
View 1 Replies
Dec 15, 2010
I am fairly new to web development & stuck up using the ajax:popupExtender inside a gridview/Itemtemplate. So, would like to get help from experts in the forum
[Code].....
Currently I m developing a web page which holds a grivview. As one of the column needs a multiple column dropdown with soring facility, I am using ajax:popupExtender to achive that. Basically in the column i have a Panel1(label & image which mocks up has a dropdown), ajax:popupExtender, Panel1(gridview to have mutiple column). When user clicks on it the ajax:popupExtender is called & the targetpopupid which is a panel2 with gridview is called.
Here when user clicks on thePanel1, I am able to display Panel2 using ajax:popupExtender. Also, when user selects some row, I am able to close/hide the ajax:popupExtender in the code behind using cancel(). (this is done in selectItemIndexchange of panel2 grid view).
But my problem comes when user doesn't select any row & clicks back on the panel1, the ajax:popupExtender will remain open. but it should have been closed as i am trying to mock up dropdown dunctionality. how can I hide/close ajax:popupExtender when user clicks on panel1 2nd time.
Following are the different approaches I tried but nothing worked out.
1. wrote JS, & tried to add attributes of the Panel1's onclick event.
Failed: Error - Object is undefined. even though i passed a valid obj from code behind.
<script language="javascript">
View 5 Replies
Mar 24, 2011
I have a popup extender that shows when an edit button in a grid is clicked. I am disabling the checkbox and submit button when a particular row is clicked with sone validation. When I close the popup and show again by pressing button on another row the controls are still disabled. Why are these controls properties set permanently on entering the if condition ?
button click event for button on the panel that pops up on a button press in grid
[Code]....
View 3 Replies
Dec 28, 2010
how to setting the targetcontrolId and showing the popupextender in javascript by using popupextender behaviourId or its serverId?
View 2 Replies
May 19, 2010
I have a page with one button. When the button is clicked, a ModalPopupExtender is open, and data is populated from database and displayed in the popup box. The data retrieved is bound to dynamically generated CheckBoxLists, one CheckBoxList for each category (there maybe 3, maybe 5 CheckBoxLists, depending on the categories). I need take down whatever the user checked on those CheckBoxLists from the popup window. But I got no way to find those checked items. Any button in the popup window dose only one thing: closes the window. No matter what I code under this button, is not executed.
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="popupPanel" runat="server" CssClass="register" >
<br />
[Code]....
View 2 Replies
Dec 15, 2010
I have an asp:Table which resides inside an asp:updatepanel. Most (but not all) asp:TableCell's are filled with buttons which all should be opening the same popupwindow though with different content (depending on the button that was clicked), and the popup itself has its own updatepanels, as the purpose of the popup-window is being an interactive form.My question is: (how) can I use a popupextender for more than 1 button, so that it works with async postbacks? setting the TargetControlID to the id of the button that was clicked will only happen -indeed-after clicking the button so a full page postback is already happening when setting it.Or should I create one popupextender for each button in my table which all point to the same asp:panel? the buttons are created runtime, then where do I go from there?Or am I still on the wrong track here?
View 3 Replies
May 7, 2015
I have a gridview i want to know how to get data of gridview row on button click
protected void Button1_Click(object sender, EventArgs e)
{
GridView grd = (GridView)((Button)sender).NamingContainer;
string name = grd.SelectedRow.Cells[0].Text;
}
[Code] .....
View 1 Replies
Feb 10, 2011
I am embedding a popup extender inside a tab...simple enough - for some reason the content is visible when the page loads - it can be dismissed by selecting the button and then dismissing the popup. Everything works in compatability mode.
I can't tag the panel as visible=false as it is no longer rendered at all.
[Code]....
View 2 Replies
Nov 4, 2010
What is available in .NET 3.5 that is AJAX but does not require the toolkit?
View 5 Replies
Dec 8, 2010
I am Getting the following error using the Numeric UpDown Control from Ajax Control Toolkit.
Assembly 'AjaxControlToolkit, Version=3.0.30512.20315, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' contains a Web resource with name 'AjaxControlToolkit.NumericUpDown.NumericUpDownBehavior.debug.js', but does not contain an embedded resource with name 'AjaxControlToolkit.NumericUpDown.NumericUpDownBehavior.debug.js'.
View 2 Replies
Jun 28, 2010
I'm using the AutoCompleteExtender control with a textbox. The control functions the way I want it to but I have one issue with it. When the page first loads I type something in the textbox and I get a list of suggestions from my database. When the list is quite big the vertical scroll bar appears on the right side of the browser window and the textbox is repositioned to the center of the page (I want the textbox to be centrally positioned and I'm using <center> tags). Unfortunately the AutoCompleteExtender list doesn't reposition and is misaligned. The same thing happens when the browser window is resized.
I've played around with CSS and OnClientShown and haven't managed to fix this. I'm currently using IE8.
View 4 Replies
Sep 22, 2010
I am wondering if anyone could shed some light on why onclick of the target control does not work. I am asking this mainly out of curiosity because replacing onclcick with onfocus achieves what I need.
View 3 Replies
Mar 7, 2011
How Can I open Ajax Modal Pop up without Using Target Control Popup Event.. i want to open it by Code Condition in .CS ..... so how can i handle that
View 4 Replies
Mar 3, 2010
I'm using the AJAX Control Toolkit with VS2008 Professional and I'm experiencing a weird problem with the date format.I have two textboxes on a webpage for inputting dates. The date format I wish to use for both textboxes is MM/dd/yyyy. One textbox has a calendar extender attached to it and the other doesn't. When I first load the page, I set the first textbox (the one with the calendar extender) to today's date and then I call a function inside the code-behind for the page that calculates the value of the second textbox's date and displays it.
t the date format of the first textbox is M/d/yyyy as long as I have the calendar extender on the page. If I remove the extender, everything is okay.Here is what the page HTML looks like: [Code]....
Here's the vb code from the page code-behind:
[Code]....
[Code]....
View 2 Replies
May 9, 2010
I would like to change the default "target" for Link in HTML Editor. By default it is set to "Current Window", but I want to set it to "New Window" by default. Is it possible for HTMLEditor Control?
View 3 Replies
May 20, 2010
how can change target control ID of an autocomplete Extender without refreshing page or using update panel
exactly with ajax!!!
and how can add an new instance of server controls like Ajax control toolkit or Standard controls like TextBox,Button,..
View 1 Replies
Jun 21, 2010
The target control is a Button (ID = "btTest");
The following is in code-behind:
[Code]....
The click has been verified, but the popup does not show. Of course, if btTest is manually clicked, the popup will show without any problem.
Is there any way to show a popup window from code-behind?
View 20 Replies
Oct 30, 2010
I have GridView on my asp.net page, one column in that grid is ImageButton (TemplateField with ID="imbReserve"). On click on that button I want to show PopUp, but when I put TargetControlId="imbReserve" I get error message " A control with ID 'imbReserve' could not be found". How to achieve this, on click on button inside Grid show PopUp ?
View 2 Replies
Mar 30, 2011
I have a modalpopup extender attached to a button. That is to say the button is the targetcontrol id of the modalpopupsxtender. I would still like the onclick event of that button to work because only the onclient click event is working. How can i go about this.
View 1 Replies
Apr 20, 2010
I am trying to give animation effect to a label , when user select option from radio buttonlist for selectedindexchange event , but i cannot get animationextender for this event.because <onLoad> <onClick> ..... list does not have <onSelectedindexchanged> option. how to do this I saw a code which adding animation effect from server side, though i have problem of excute on radiobutonlist index change event.
View 1 Replies
Dec 22, 2010
When iam try to add ajax control dll file to my ajax toolkit given in visualstudio express edition 2005, i am getting the following error.
"There are no components in 'C:ProgramFilesMicrosoft ASP.NETASP.NET 2.0 Ajax Extensionsv1.0.61025AJAXExtensionsToolbox.dll' that can be placed on the toolbox." what is the error in this?
View 2 Replies
Aug 10, 2010
I am tring to use Jquery autocomplete into my asp.net 2.0 application, I have all necessary file in place, I tried to worked on , but it seems like this is not working,can some one tell me that is asp.net 2.0 application without using AJAX toolkit works with Jquery autocomplete or it does not work?Note: this is plain asp.net 2.0 web application, it is not using AJAX.
View 6 Replies
Dec 1, 2010
i have used ajax control toolkit masked editor extender.i want to remove "_" from masking pattern and want to replace it with space. for ex. want " - - " instead of this
<
asp:MaskedEditExtender
ID="MEETxbPhone"
TargetControlID="txbPhone"
Mask="999-999-9999"
[code]...
View 2 Replies
Apr 6, 2010
How i can create collapsible textbox with jquery or ajax control toolkit.
View 1 Replies