Custom Control with JScript in GridView Edit button (AJAX Extension)

I am new in AJAX Extension and I am facing a problem. I have page in which I have taken a GridView control and I have a Custom Control DateBox (which read JScript file and register with the page in PreRender event of control).

I have button in Grid (lets say btnExprienceEdit). When I edit the row it loads the DateBox control in normal aspx page (without AJAX) it works fine but as soon as I put <asp:UpdatePanel>GridView</asp:UpdatePanel> or enable AJAX, javascript doesn't work.

protected override void OnPreRender(EventArgs e)
 // methods load script in register with Page object.
 CodeHelper.Scripts.RegisterFormatCurrencyScripts(Page, _Precision);
 CodeHelper.Scripts.RegisterDecimalToCurrencyScript(Page, this.CurrencySymbol);

GridView in ASPX

<asp:UpdatePanel ID="updateExpriencePanel" runat="server">
  <asp:GridView ID="gvExperience" runat="server" AutoGenerateColumns="False" Width="100%"
   HeaderStyle-CssClass="gridheader" RowStyle-CssClass="gridrow" AlternatingRowStyle-CssClass="alternaterow">
    <asp:TemplateField HeaderText="Start" ItemStyle-Width="85px">
      <%# Eval("START_DT") %>
      <library:DateBox ID="dtStartDate" runat="server" CssClass="datebox" ButtonImage="./Images/Calendar/Calendar.gif"
       Width="63px" />
    <asp:TemplateField ItemStyle-Width="43px">
      <asp:ImageButton ID="btnExprienceEdit" runat="server" CommandArgument='<%# Container.DataItemIndex %>'
       ImageUrl="./Images/edit.gif" AlternateText="Edit" OnClick="btnExprienceEdit_Click" />
      <asp:ImageButton ID="btnExprienceDelete" runat="server" CommandArgument='<%# Container.DataItemIndex %>'
       ImageUrl="./Images/delete.gif" AlternateText="Delete" OnClientClick="return deleteConfirmation()"
       OnClick="btnExprienceDelete_Click" />
      <asp:ImageButton ID="btnExprienceUpdate" runat="server" CommandArgument='<%# Container.DataItemIndex %>'
       ImageUrl="./Images/save.gif" AlternateText="Update" OnClick="btnExprienceUpdate_Click" />
      <asp:ImageButton ID="btnEducationCancel" runat="server" CommandArgument='<%# Container.DataItemIndex %>'
       ImageUrl="./Images/cancel.gif" AlternateText="Cancel" OnClick="btnExprienceCancel_Click" />

How can I resolve the problem. Am I doing anything wrong. Thanks in Advance.


1/23/2007 5:41:21 AM 13973 articles. 1 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 17
Get it on Google Play
Get it on Apple App Store

You have to modify the CodeHelper.Scripts class. If you register a script using Page.ClientScript.RegisterScriptBlock or Page.RegisterClientScriptInclude etc., you should change that to Scriptmanager.RegisterClientScriptBlock or ScriptManager.RegisterClientScriptInclude.
1/23/2007 11:08:53 AM

It works.

Thanks Krishna.

2/7/2007 3:41:12 AM

Similar Artilces:

How to instantiate an AJAX control inside a custom AJAX control
Hi I want to include a ToggleButton control inside a custom AJAX control.  How can I instantiate an instance of the ToggleButton in my Javascript?  If I create an instance of the ToggleButton in C# code, how could the Javascript pick it up?  Thank you,  ltlwinger Final Answer.Good Luck this._pin = $create(AjaxControlToolkit.ToggleButtonBehavior, { 'id': this.get_id() + "_ToggleButton", 'CheckedImageUrl': 'images/collapse.jpg', 'UncheckedImageUrl': '... controls used in custom composite controls?
I am creating an events calendar that uses the accordion to display the events for the selected day.  The problem I'm having is that the accordion is not responding to any client side events.  I would really like to find a good "How to" article for building composite controls that incorporate an control like the accordion....

From Atlas Custom Extension to AJAX Custom Extension
Hi Guys, I try to develop Custom extension one month ago whit old tecnology ATLAS, when I think my develop problems are finished.....Change the card on the table. The question is this: In the old Extension of ATLAS, I can made a extension whitout specify the handled target ID control on the page, in the new AJAX extensio this is not possible in the  class base because the AjaxControlExtender are  changed in : [Designer(typeof(myAjaxControlExtenderDesigner))] [ClientScriptResource("myAjaxControlExtender.myAjaxControlExtenderBehavior", "myAjaxControlExtender.myAjaxControlExte...

A gridview control having a fixed column option? ajax or no ajax.
Is there a plan that the gridview control will have a fixed column option, ajax or no ajax?Maybe someone can show me a workaround on this one. Thanks in advance.Caloy -------------_;-) Please explain what you mean by a "fixed" column Size? Data? Color? You can do just about anything you need to with a template field. Possibly are you looking for a column that stays in place on the page, while the rest of the columns scroll?Bryan SampicaAuction Site StarterKit |My Blog a column that stays in place on the page, while the rest of the columns scroll? ans: yes.Caloy -------------_;-) ...

How do we customize Ajax calendar Control and Ajax Tabbed Panel?
Hi FriendsAm confronting with a very trivial issue of customizing the tabbed panel and the Calendar controls of the Ajax control toolkit. Can anyone give me some ideas of how to customize these as I tried changing the CSS and setting the new css, but all in vain.can anyone help me out with this issue?Thanks Karthik MuthuswamyProgrammer AnalystChennai I tried my own idea. Thanks everyone.Karthik MuthuswamyProgrammer AnalystChennai...

My AJAX is not AJAXing!
Hi, I was having trouble with a new AJAX enabled code so I tried to just to do a simple test page. I did the simple Label control with button example covered in this tutorial I'm having the same problem. Functionalitw-wise it works but the page is refreshing and flickering. That means it's not the code but maybe my set up. I'm using VisualStudio 2005 and the application is currenty .NET 2.0. In VS.NET, I do see the AJAX controls though. What could this be?Thanks,Sam did you install the Ajax extensions? Now, it's AJAXing!...

Custom controls having Ajax Controls
I have a custom control called ModalUpdateProgress. I don't want to narrow down the topic to why do I have to build it or something else. The point of control is to lock a sceen while postback happens so it is a conjunction of Update Progress and Modal Popup Extender. I had no problem to build a control similar to Update Progress. Then I add Modal Popup Extender:   if(typeof(undefined) != typeof(AjaxControlToolkit)) if(typeof(undefined) != typeof(AjaxControlToolkit.ModalPopupBehavior)) { this._modalPopupBehavior = $create(AjaxControlToolkit.ModalPopup...

To AJAX, or not to AJAX?
Some body suggested to me to use AJAX. I figured it's not the brand name detergent nor the Dutch city. So here is what I have and please tell me if it ca be done with ajax, and perhaps point me to some examples, etc. The page contains several GridViews and FormViews that display data using several data calls. (Yeah, there is my first issue. Need to figure out how to cash all that.) This is an application that track work orders, so the top most FV has the user info and summary information of the work order. It is editable and so far it works well. There is also another set of infroamt...

ajax or not to ajax.
Heres a strange one for you. I have a textbox, a button and a gridview on a page. I enter some search text which returns 500 odd records in under a second. When i wrap the gridview in an updatepanel, set its update mode to "conditional" and the trigger to the button the page can take 2-4 seconds to render. I think the problem is down to page redering some how as my progress indicator stops at around the same time as the normal postback would appear. I have also noticed this very behaviour and have come to the conclusion that in cases like this it is better to hand code a XMLHttp...

Custom Ajax enabled GridView control not working!!!!
Hello,         I'm using ajax atlas. I need to make an ajax enabled GridView (Custom control). I wrote the code but it's not working. I'm a beginner (Ajax user) This is my code:1 public class Class1 : CompositeControl 2 { 3 #region Private variables 4 private ScriptManager sManager; 5 private GridView gridView; 6 private TextBox txtBox; 7 private UpdatePanel uPanel; 8 #endregion 9 10 protected override void CreateChildControls() 11 { 12 ...

Creating AJAX Based custom gridview control
Hi, I want to create AJAX based custom gridview control which will be able to show the data from a database as well as XML file. Also, it will allow to edit multiple records, and will have paging and sorting features. Can anyone provide me any hint on how to develop such control? Thanks, HarshadHR You dont have to built. it is already there Live .NETKazi Manzur Rashid (Amit)_________________________Web: http //dotnetshoutout.comBlog:

Referecening Back to Controller (custom ajax extension)?
Hi I'm currently wrapping up an custom extension, but have one problem. The extension is assign to a textbox. When I type something in the textbox a menu bellow it appears with a dynamically contstructed html table. This table object is added to an label (appendChild) which I have defined as an popup. On this label I have attached an onclick event, and it fires no problem.  The problem is that I want to populate the textbox (that triggerd the popupelement) , and when i click on the label, focus (from the textbox) is lost, and I have no referecence to the textbox (is...

Creating AJAX Based Custom GridView Control
Hi, I want to create AJAX based custom gridview control which will allow to edit multiple records. Also, it will have paging and sorting features. Can any one provide me any guidence on how to start programming such control? Thanks,HarshadHR You can use a plain vanilla DataGrid to edit multiple records. Using GridView, you can only edit one row at a time. Sorting: Paging: You could stick the whole thing in...

Configure AJAX extensions to enable AJAX controls ***WITHOUT*** using web.config file
I've inherited a legacy application that has many issues.  I'm not going to get into specifics or debates about what *should* be done; I know what *should* be done, but right now I have to <sigh> 'get 'er done'.So here's what I need to do:I need to get the AJAX controls working WITHOUT using the configuration file.  Of course things work great if I update the configuration file declaritively, but that's not option.Now with WF I can set my managers (such as adding the persistence service or adding the manual scheduler service) declaritively or in co...

Web resources about - Custom Control with JScript in GridView Edit button (AJAX Extension) -

HNN extension - Wikipedia, the free encyclopedia
... subgroups of G are conjugate (through a given isomorphism) in G' . In terms of the fundamental group in algebraic topology , the HNN extension ...

Star Wars: The Force Awakens: Browser extensions help avoid online spoilers
There are at least two extensions for Google's Chrome browser that will help you stay away from spoilers for the new film.

Burundi unrest: 7 killed in violence related to president's extension of his time in power - CTV News ...
Seven more people were killed in Burundi's capital in violence associated with turmoil over President Pierre Nkurunziza's extension of his term ...

Skype iPhone & iPad app gets improved sharing with iOS extension
... if you’re unfamiliar: The updated Skype app for iPhone and iPad is available on the App Store. Filed under: Apps Tagged: App Store , extension ...

HC.Gov extension to 12/17
... in comments over the past day about what to do if you were stuck in . I thought there was a good chance of a 1 to 3 day extension ...

Solar & Wind Tax Credit Extensions Big Boost To Solar & Wind Growth
... Returns Support to Wind and Solar After many long months of deliberations and lobbying, the US Congress has approved a five-year extension to ...

‘Dance Moms’ Star Abby Lee Miller Threatens Exit From Upcoming Season; Seeks Extension In Legal Battle ...
The Dance Moms host seems to be fighting two different wars on two separate fronts, both of which could possibly see Abby Lee Miller on TV a ...

Solar ITC extension will halt installation rush in the US and stabilize global PV market growth, says ...
The US House of Representatives passed an amendment to extend the solar Investment Tax Credit (ITC) on December 16. The extension, which is part ...

Block all 'Star Wars' spoilers with this Chrome extension
... see Star Wars: The Force Awakens on the day it comes out, you're going to have a tough time dodging spoilers on the internet. This Chrome extension ...

Free App Friday: 5 Great Time-Saving Chrome Extensions
... yes? Might as well get some work done while you're at it. It's time to turn Chrome into a lean, mean efficiency machine with these free extensions. ...

Resources last updated: 12/18/2015 7:17:02 PM