This is a migrated thread and some comments may be shown as answers.

MustOverride function with GridCommandEventArgs

4 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dominic
Top achievements
Rank 2
Dominic asked on 17 Sep 2008, 02:44 PM
Hi

Maybe im missing something... I have to make a "MustIhnerit" class that will contains a "mustOverride" function that take a GridCommandEventArg as input parameter. My Problem is, when i use a GridCommandEventArg as parameter i have the error : "'MyFunction' cannot be declared 'Overrides' because it does not override a function in a base class. " but if i use an integer as input parameter, all is wroking good ! So maybe i misundertand somthing about it.

Thanks in advance for your help.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 17 Sep 2008, 02:47 PM
Hello Dominic,

Can you post a code snippet which illustrates this?

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dominic
Top achievements
Rank 2
answered on 17 Sep 2008, 02:55 PM
Hi,

First, thanks for your answer... there is my code snippet. If you need more details, fell free to ask :

Public

MustInherit Class BaseDefinitionModule
Inherits UserControl

Private _ProjectID As Integer

Protected Property ProjectID() As Integer

Get

Return _ProjectID

End Get

Set(ByVal value As Integer)

_ProjectID = value

End Set

End Property

Protected MustOverride Function test(ByVal e As GridCommandEventArgs)

End Class



Partial

Class DetailedProjectObjectives
Inherits BaseDefinitionModule

    
Protected
Overrides Function test(ByVal e As GridCommandEventArgs) As Object

Return "test"

End Function

End

Class

0
Vlad
Telerik team
answered on 17 Sep 2008, 03:05 PM
Hi Dominic,

I think that you need to use "Overridable" keyword.

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dominic
Top achievements
Rank 2
answered on 17 Sep 2008, 03:14 PM
Mmmm, correct me if im wrong but 'Overrideable' means that my base class contains an implementation of this method but here it is not the case. If i declare my function overridable i have to implement a logic in this method.
 
If i change my parameter's type for an integer and keep it MustOverride, everything working good ??

Tags
General Discussions
Asked by
Dominic
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Dominic
Top achievements
Rank 2
Share this question
or