473,326 Members | 2,173 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,326 software developers and data experts.

Handle Selected index change

I am becoming extremely frustrated with the event handlingin C#. I need
to handle the OnSelectedIndex changed event and am getting the
following error message when I build the application.

C:\Documents and Settings\Administrator\My Documents\Visual Studio
Projects\RecipieGuide\FormRecipe.cs(599):
'RecipieGuide.FormRecipie.tabAlphabet_OnSelectedIn dexChanged(object,
System.EventArgs)': no suitable method found to override

This is my override functon.
protected override void tabAlphabet_OnSelectedIndexChanged(object
sender, EventArgs e)

And I am adding an event handler with the following code
this.tabAlphabet.SelectedIndexChanged += new System.EventHandler
(this.tabAlphabet_OnSelectedIndexChanged );

If someone could provide and example of what I need to do here, or
explain what I am doing wrong or not doing it would be greatly
appreciated.

Thanks
Bill

P.S. I'm trying to handle this on a tab control if it makes a differance

Nov 17 '05 #1
2 5024
"william_dudek@_yahoo_com" <wi***********@yahoo.com> wrote in
news:11*********************@g49g2000cwa.googlegro ups.com:
I am becoming extremely frustrated with the event handlingin C#.
I need to handle the OnSelectedIndex changed event and am
getting the following error message when I build the
application.

C:\Documents and Settings\Administrator\My Documents\Visual
Studio Projects\RecipieGuide\FormRecipe.cs(599):
'RecipieGuide.FormRecipie.tabAlphabet_OnSelectedIn dexChanged(obje
ct, System.EventArgs)': no suitable method found to override

This is my override functon.
protected override void
tabAlphabet_OnSelectedIndexChanged(object sender, EventArgs e)

And I am adding an event handler with the following code
this.tabAlphabet.SelectedIndexChanged += new
System.EventHandler
(this.tabAlphabet_OnSelectedIndexChanged );

If someone could provide and example of what I need to do here,
or explain what I am doing wrong or not doing it would be
greatly appreciated.

Thanks
Bill

P.S. I'm trying to handle this on a tab control if it makes a
differance


Bill,

Remove the "override" directive from your method.

--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 17 '05 #2
Thanks that did it. I wonder why VB.Net makes it so easy to do this and
C# makes it so hard, granted there is more flexibility in C#, I don't
see why it can't be easier to do things like this.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: R.Wieser | last post by:
Hello All, I'm trying to get a "Virtual Listbox" to work. I've currently got a form, and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and LBS_NODATA flags on it. I've...
3
by: Nilz | last post by:
Hi Guys, Do anyone know how to change the BorderStyle of the selected row . I tried using the Band Property of the UltraGrid but the change is applied to each and every Cell in the Grid. Anybody...
9
by: Steffen Laser | last post by:
Hi group, I have a problem that I already have posted to the german C# newsgroup. Since nobody could help me there, I'd like to try it here again: I set the selected item of a combobox like...
1
by: LagartijaNick | last post by:
Question: I have a ListView in which I'm selecting a ListViewItem based on the value of a textbox. On my XP machine (with default color scheme) the ..Selected row is a noticable grey (back color...
3
by: John Walker | last post by:
Hi, On an ASP.NET page I have a drop down list control. When the user pulls down the list and makes a selection, I perform validation, and if the validation fails I want the selected item in...
5
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens...
11
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
6
Frinavale
by: Frinavale | last post by:
I have a control that is supposed to allow the user to either allow or cancel what they were doing. When I apply this to a <select> element (or DropDownList), I cannot save the original value to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.