Solved

GridviewRowEventArgs class wrapper

Posted on 2013-02-04
3
640 Views
Last Modified: 2013-02-05
I have created my own controls that inherit from the .net controls. Then I reference the new custom controls in my code behind and erase "using system.web.ui.webcontrols"

This works as expected on almost everything.

The problem is when I call some gridview events, it does not recognize the type of argument.

protected void gvGridview_RowDataBound(GridViewRowEventArgs e)

Open in new window


One method to fix would be:

protected void gvGridview_RowDataBound(System.Web.UI.WebControls.GridViewRowEventArgs e)

Open in new window


However, I do not wish to do this because there are literally hundreds of applications that will use these custom controls. My wish is to drop it in, change the "Using" statement so it references my class library, then change the base page so it inherits my base page and be done.

I've researched and it seems you cannot override types. I've seen some mention of custom class wrappers, and aliases. I'm not sure what is best on how to do this. I assume (and may be wrong) that Telerik does this unless they created their RadGrid from the ground up and never inherit gridview.

Thanks!
0
Comment
Question by:nevernerd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
Roopesh Reddy earned 500 total points
ID: 38854466
Hi,

Yeah!

Moreover, GridViewRowEventArgs is derived from EventArgs. So did you tried implementing the custom functionality as GridViewRowEventArgs do?

http://forums.asp.net/t/1001258.aspx

Hope it helps u...
0
 

Author Comment

by:nevernerd
ID: 38854670
I tried something similar but it was based on an example I did not understand cause they replaced everything with meaningless names :) This is a good example. I can't wait to try it.
0
 
LVL 23

Expert Comment

by:Roopesh Reddy
ID: 38854905
Hi,

Aaah, OK!

Hope it helps u...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question