473,396 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Why event "MoveNext" is not fired in this server control?

I have a composite sever control with a gridview and a custom navigation toolbar, could you take a look, why events of button MoveNext in the toolbar is not fired? Thanks in advance,

Expand|Select|Wrap|Line Numbers
  1. public class cSCGridNavigatorPanel: WebControl, INamingContainer
  2.   ..
  3.   protected ImageButton fbtnNext;
  4.   ..
  5.   public event ImageClickEventHandler btnNext_Click;
  6.   protected void fbtnNext_Click(object sender, ImageClickEventArgs e)
  7.   {
  8.     if (btnNext_Click != null)
  9.       btnNext_Click(sender, e);
  10.   }
  11.  
  12.  
  13.   ..
  14.   protected override void CreateChildControls() 
  15.   { 
  16.     ..
  17.     fbtnFirst = new ImageButton(); 
  18.     fbtnFirst.Click += new ImageClickEventHandler(fbtnFirst_Click);    
  19.     this.Controls.Add(fbtnFirst);    
  20.     ..
  21.   }
  22.  
  23.   protected override void Render(HtmlTextWriter writer)
  24.   {
  25.     EnsureChildControls();
  26.     AddAttributesToRender(writer);  
  27.     ..
  28.     fbtnNext.RenderControl(writer);
  29.     ..
  30.   }
  31. }
  32.  
  33.  
  34. public class cSCGridWithNavigatorPanel: WebControl, INamingContainer 
  35. {
  36.   public cSCGridWithNavigatorPanel() {}
  37.   ...
  38.   GridView fDataGrid;
  39.   GridNavigatorPanel fNavigatorPanelTop;
  40.  
  41.   protected void MoveNext(object sender, System.Web.UI.ImageClickEventArgs e)
  42.   {          
  43.      if (fDataGrid.CurrentPageIndex < fDataGrid.PageCount-1) 
  44.        fDataGrid.CurrentPageIndex += 1;
  45.   }
  46.  
  47.   protected override void CreateChildControls() 
  48.   {
  49.     this.DataBind(); 
  50.     fNavigatorPanelTop = new cSCGridNavigatorPanel(this.ClientID,"fNavigatorPanelBottom");
  51.     fNavigatorPanelTop.ID = "fNavigatorPanelTop";    
  52.     ..
  53.     fNavigatorPanelTop.btnNext_Click += new ImageClickEventHandler(MoveNext);
  54.     ..
  55.     this.Controls.Add(fNavigatorPanelTop);
  56.   }
  57.  
  58.   protected override void Render(HtmlTextWriter writer)
  59.   {
  60.     EnsureChildControls();
  61.     AddAttributesToRender(writer);
  62.     ..
  63.     fNavigatorPanelTop.RenderControl(writer);
  64.     ..
  65.   }
  66. }
Oct 4 '10 #1
0 923

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Alont | last post by:
so how I can test asp code as I test VB project? the function such as "start","step into",etc. all can't use when I edit asp file, InterDev can't "Start" asp file? the IE give me such a simple...
4
by: dmiller23462 | last post by:
Somebody take a look and give me any suggestions? My brain is nuked... Here's my deal....I have online submission forms on my intranet at work here....I am appending to an Access DB with the...
3
by: Phil Powell | last post by:
'GET THE HTML CONTENT FOR DISPLAY BAND ORIGIN Dim bandOriginDropdown On Error Resume Next set scraper = Server.CreateObject("Microsoft.XMLHTTP") if err then bandOriginDropdown = "" else...
32
by: James Curran | last post by:
I'd like to make the following proposal for a new feature for the C# language. I have no connection with the C# team at Microsoft. I'm posting it here to gather input to refine it, in an "open...
59
by: Rico | last post by:
Hello, I have an application that I'm converting to Access 2003 and SQL Server 2005 Express. The application uses extensive use of DAO and the SEEK method on indexes. I'm having an issue when...
1
by: melda | last post by:
I am a real beginnner in ASP. Due to increasing demands on dynamic website, I've been working on ASP website now. I use a ready to use CMS program and right now I've been trying to combine a calendar...
5
by: Nick Gilbert | last post by:
Hi, I'm using the asp:Wizard control and on some of the steps, I would only like the user to be able to progess to the next step by clicking an image button. Therefore I would like to be able to...
6
by: active | last post by:
This works with Strict Off But not with Strict On Sometimes I can figure out what is needed by running it and using QuickWatch to see the type required but GetObject("winmgmts:\\" &...
2
by: hudbarnett | last post by:
Hi all Hope someone can help me here. I have a website that i have added a search engine too, it searched results that i have stored into a database. I would really like it when a list of pages...
0
by: Louis Dupont | last post by:
I have a gridview and a set of image buttons for grid pages navigation inside a server control, but events of such image buttons are not being fired, could you please take a look: public class...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.