Yes, but it is generally done on binding, which may not solve your issue
properly. If you can go this route, rebind the control on row click and then
use the row data binding event to create a second row when you bind. I have
not completed this particular task, so it may turn out to be a royal pain.
:-)

Signature
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
*************************************************
> OK, I am still trying to achieve something like what is shown in the
> following PNG image.
[quoted text clipped - 17 lines]
> the Button Click event takes place? I haven't found anything about
> this question.
gnewsgroup - 31 Oct 2007 18:36 GMT
On Oct 31, 1:22 pm, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo...@comcast.netNoSpamM> wrote:
> Yes, but it is generally done on binding, which may not solve your issue
> properly. If you can go this route, rebind the control on row click and then
> use the row data binding event to create a second row when you bind. I have
> not completed this particular task, so it may turn out to be a royal pain.
> :-)
Thank you. Well, there are two data sources: one for the export total
and import total per year (what's shown before expanding), the other
for the breakdown of a particular year (the expanded part), as shown
in the image.
Will the row data binding event know where I want to insert the newly
created row?
Cowboy (Gregory A. Beamer) - 31 Oct 2007 19:24 GMT
To the question, it is not automagic. You will have to pull the rows out
with code to display the related data. The binding event will just allow you
to examine each row bound until you get to the selected row and you will
have to add the information.
If the data is related, you can look at some of the examples people have
done with hierarchical data controls. I believe Dino Esposito wrote one for
MSDN magazine. Will have to check. This sounds like it might be more up your
alley based on what you are doing.
NOTE: You may also find the DataSource controls a bit unwieldy as you step
outside of this box. They encapsulate a bit too much functionality when you
start getting creative.

Signature
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
*************************************************
> On Oct 31, 1:22 pm, "Cowboy \(Gregory A. Beamer\)"
> <NoSpamMgbwo...@comcast.netNoSpamM> wrote:
[quoted text clipped - 14 lines]
> Will the row data binding event know where I want to insert the newly
> created row?
the table has enough events. the [+] can be a submit button with a
command arg. you are going to need to track the state of the buttons on
the serverside unles only one can be open at time.
note: the most common approach is to actually render the hidden rows but
set the display style to none. then javascript changes the style.
-- bruce (sqlwork.com)
> OK, I am still trying to achieve something like what is shown in the
> following PNG image.
[quoted text clipped - 17 lines]
> the Button Click event takes place? I haven't found anything about
> this question.
gnewsgroup - 31 Oct 2007 18:40 GMT
> the table has enough events. the [+] can be a submit button with a
> command arg. you are going to need to track the state of the buttons on
[quoted text clipped - 4 lines]
>
> -- bruce (sqlwork.com)
Thank you. Yes, I am aware that the [+] ImageButton can have a
command argument, which I actually tried, but what do we assign to the
CommandArgument property? Is there anyway to assign the row index to
it? I know that the row index can be captured this way for a GridView.
bruce barker - 31 Oct 2007 19:14 GMT
i assumed you'd set the command arg to the index, and assign the same
handler to all the buttons.
-- bruce (sqlwork.com)
>> the table has enough events. the [+] can be a submit button with a
>> command arg. you are going to need to track the state of the buttons on
[quoted text clipped - 9 lines]
> CommandArgument property? Is there anyway to assign the row index to
> it? I know that the row index can be captured this way for a GridView.
gnewsgroup - 31 Oct 2007 19:21 GMT
> i assumed you'd set the command arg to the index, and assign the same
> handler to all the buttons.
>
> -- bruce (sqlwork.com)
OK, so the problem loops back: How do we get the index of the row in
which the button is clicked? In a GridView, we say
Container.DataItemIndex. But what is it for a Table server control?