c-for-beginners | If you 're a beginner in the C language or want to practice | Web Site library
kandi X-RAY | c-for-beginners Summary
kandi X-RAY | c-for-beginners Summary
If you're a beginner in the C language or want to practice there is some challanges for you to train your C!
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of c-for-beginners
c-for-beginners Key Features
c-for-beginners Examples and Code Snippets
Community Discussions
Trending Discussions on c-for-beginners
QUESTION
I want to execute the ShowControls()
method in Class2 (and other) classes by using an interface. Show Controls() method contains a switch statment that determines to show or hide various controls (many of which are custom user controls) in GridView's item template based on it's row index during GridView databind. When I call the method from Class2 I am getting this error message: CS1503 Argument 1: cannot convert from 'System.EventArgs' to 'System.Web.UI.WebControls.GridViewRowEventArgs'. This confuses me since I clearly have specified parameter GridViewRowEventArgs
in the method.
Can someone help me set this up correctly? Maybe I can't reference web controls in an Interface? I have referenced specifically the following using statements in I_BuildGridView
and BuildControl
:
ANSWER
Answered 2018-May-11 at 19:10I thought about deleting this question but will leave it to discretion of the moderator. After thinking about it I realized that the Page_Load() event wasn't the place to call the ShowControls() method but the GridViews' RowDataBound event was - because the reference to the parameter would be available from there and not known yet in the Page_Load() event. At least that's my reasoning. Let me know if I'm wrong.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install c-for-beginners
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page