Groups | Blog | Home
all groups > asp.net building controls > november 2004 >

asp.net building controls : Extending datagrid with new/insert button



Manuel Trunk
11/17/2004 5:29:10 AM
Hi,
I try to develop a server control which inherits from DataGrid and adds a
new/insert button to this grid. This is no problem, but I can't get the event
fired from this new button.
I tried everything, implementing INamingContainer and IPostBackDataHandler,
added the button to the footer of the datagrid and so on. Nothing works.
Anyone who can help me?

Kind regrads,
Manuel Trunk
11/18/2004 2:15:03 AM
[quoted text, click to view]

Hi Thiruppathi,

the problem is that I don't have any template within a server control
inherited from datagrid.

Best regards,
Manuel Trunk
11/18/2004 6:09:05 AM
Hi Thiruppathi,

this could work, but I want to place the button below the datagrid and later
I want to add an "editForm" which the user of the control specifies. Found no
working solution for that until now.

Regards,
Manuel

[quoted text, click to view]
Manuel Trunk
11/18/2004 6:23:01 AM
[quoted text, click to view]

hi,
Thiruppathi S
11/18/2004 3:29:08 PM
Hi Manuel,

Just add a footer template with required fields and add a button with
command name
when u click the button the datagrid itemcommand fires.u can capture this
and do the rest.

i hop this will help u.

Rgds,
Thiruppathi S
[quoted text, click to view]

Thiruppathi S
11/18/2004 7:25:37 PM
Hi Manuel,

Create a ITemplate column and add this on datagrid on databinding
for this you can see dynamically creating template column in datagrid in
google

Rgds,
Thiruppathi S

[quoted text, click to view]

Thiruppathi S
11/18/2004 7:44:07 PM
hi,

where u want to add the editform

[quoted text, click to view]

AddThis Social Bookmark Button