Groups | Blog | Home
all groups > asp.net building controls > august 2003 >

asp.net building controls : Inherit Datagrid


Martin Kulov
8/29/2003 11:23:27 AM
Hi guys,

I am trying to implement server control that inherits
DataGrid control in order to preserve all of his
properties and templates. However I want to add others
web controls besides the datagrid control that will
provide custom functionality. The problem is that these
controls are not named using the naming container of my
control but remain with their original name. Hence they
can not be processed on the server during postback.
Does anyone know how to inherit the datagrid and add more
controls on the page also?

Thanks,
Martin

Martin Johnson
9/1/2003 3:08:21 AM
Since you are inheriting your control from the datagrid
control you will be able to access all the public methods
of the base control so you will be able to add the
controls to the datagrid from the page. If you are
overriding any of the events of the datagrid remember to
call the base.<event> from the child class.

[quoted text, click to view]
AddThis Social Bookmark Button