Adding AJAX Control Toolkit CollapsiblePanelExtender programmatically

J

Jay

I'd like to add an AJAX Control Toolkit extender, the Collapsible
Panel, to a GridView row programmatically.

My justification is this:

I have rows that show stores. Some of the rows are
chain businesses with multiple branch locations.
Others are independent stores with only one location.
For the chain stores, I need to expand the
row, at the user's request, to show branch
locations. But not on the independents
where the location is already shown
on the same line as the business name.

Make sense?

So, the CollapsiblePanelExtender with the
GridView inside a Panel tag makes sense.
But I only want to populate certain rows with
the CollapsiblePanel. I'll do this in C# in
a handler for the GridView_RowDataBound
event.

Here's the question:

How do I *create* the extender control in
C#. Of course I've added a reference to the
AjaxControlToolkit.dll, but I don't know what
Using directive to use with it.

Of course I'll use a Javascript routine to
expand and collapse the panel. That's not
the question. The question is the C# stuff!

Anybody know the answer? And I apologize if
my question seems clueless...

Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top