Hello everybody, i'm beginner. I have a problem:

I have this code:

<cc1:Accordion ID="Accordion2" runat="server" SelectedIndex="0" FadeTransitions="true"
FramesPerSecond="40" TransitionDuration="250" AutoSize="None" D[B]ataSourceID="SqlDataSource1"[/B] ContentCssClass="Content" HeaderCssClass="HEADER">
...
...
</cc1:Accordion>

The code inside of Accordion is executed for each row of SqlDataSource1.

I'd like if it is possible get actually row of SqlDataSource1 that it's reading , It's possible?.

Kind Regards.

>I'd like if it is possible get actually row of SqlDataSource1 that it's reading , It's possible?.

What do you want say? Please, come again.

Thanks for answer.
Well, for each row of SqlDataSource1 it put a accordion, and i need a new selectcommand inside of Accordion with a parameter what is a field of actual row of SqlDataSource1.

I think that when you link a control (like accordion) by DataSourceID="SqlDataSource1" it'll have some way to know the row that it reading in everytime.

Do you understand?.
Thanks very much.

I think that when you link a control (like accordion) by DataSourceID="SqlDataSource1" it'll have some way to know the row that it reading in everytime.

Hi,

To know the row that have been selected in accordion you need to use:

accordionName.SelectedIndex

Hi,

To know the row that have been selected in accordion you need to use:

accordionName.SelectedIndex

Thanks but that is not problem.

When you link the accordion by "datasourceid" , internally, it read all rows and for each row it paint a accordionpane, so, i need catch a field of the row that it is reading in that time because i have to do other sqldatasource inside of accordionpane using like parameter the value of a field of principal sqldatasource.

Thanks very much for answer.

Yea but after you have the selected index the sky is the limit :-),
what i mean you can use the accordion.Rows[SelectedIndex].Field or somthing like that, i'm not sure about the syntax but you can google it!

EDIT: I'm not sure about the syntax because i have never used accordion but all .Net controls are working almost the same way.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.