S
shapper
Hello,
I am trying to extend DataPager control to have predefined template
fields.
Public Class WebPager
Inherits DataPager
Protected Overloads Overrides Sub OnInit(ByVal e As
EventArgs)
MyBase.OnInit(e)
Dim field As New TemplatePagerField
field.PagerTemplate = New WebPagerTemplate()
Me.Fields.Add(field)
Me.Fields.Add(field)
End Sub
End Class
And the template field is defined as follows:
Public Class WebPagerTemplate
Implements ITemplate
Public Sub InstantiateIn(ByVal container As Control) Implements
ITemplate.InstantiateIn
...
End Sub
End Class
The problem is that I need to run some code inside the
TemplatePagerField's Command event.
So I need to override it right?
How can I do this?
And should I do it in class WebPager or in WebPagerTemplate.
In my opinion I should override the OnCommand event in
WebPagerTemplate but I don't know how to do it.
Could someone, please, help me out?
Thanks,
Miguel
I am trying to extend DataPager control to have predefined template
fields.
Public Class WebPager
Inherits DataPager
Protected Overloads Overrides Sub OnInit(ByVal e As
EventArgs)
MyBase.OnInit(e)
Dim field As New TemplatePagerField
field.PagerTemplate = New WebPagerTemplate()
Me.Fields.Add(field)
Me.Fields.Add(field)
End Sub
End Class
And the template field is defined as follows:
Public Class WebPagerTemplate
Implements ITemplate
Public Sub InstantiateIn(ByVal container As Control) Implements
ITemplate.InstantiateIn
...
End Sub
End Class
The problem is that I need to run some code inside the
TemplatePagerField's Command event.
So I need to override it right?
How can I do this?
And should I do it in class WebPager or in WebPagerTemplate.
In my opinion I should override the OnCommand event in
WebPagerTemplate but I don't know how to do it.
Could someone, please, help me out?
Thanks,
Miguel