Ajax DataGrid Support Product Page

Grid Sound Bundle demo

Asked 25 Feb 2010 10:06:07
1
has this question
25 Feb 2010 10:06:07 Jeff Spijkers posted:
I have recently added the Grid Sound Bundle to my growing collection of DMXZone extensions, and I especially want to build a datagrid exactly like the demo where the music play when a row is clicked but I just can't get it to work. Every time I try to add the behavior I'm told that the page must first have an mp3 player on it. I don't understand it.

Can anyone point me to a tutorial that explains how the demo for the Grid Sound Bundle was done?

Thanks to all

Replies

Replied 26 Feb 2010 10:47:52
26 Feb 2010 10:47:52 Miroslav Zografski replied:
Hello Jeff,

First you need to place not only the Grid, but DMX Flash MP3 Player as well. when you have those two on page you will be able to connect them through Behavior Connector. The trick here is to set the Grid to play the correct mp3 when a certain row in grid is clicked. Here is a bit of how the Grid Sound Bundle demo was fixed:

In a database table you need to have the mp3 files in one column. Then you have to set up the mp3 player to dynamically get those so they will be in same order as in Datagrid.
Then you need to set up two behaviors on "When the row is clicked" event ( you can do this in dataGrid UI -> Details tab -> Row Behaviors) - first behavior must set the player to start -> Play. The second must be as follows:
action: Got To
Number : {id}-1
That requires your database records ids to start from 1 and to not have any missing numbers.
And you are done.

Regards,
Replied 26 Feb 2010 19:33:39
26 Feb 2010 19:33:39 Jeff Spijkers replied:
Thanks for the awesome help... I finally managed to get it working, although I still can't figure out how the player controls are integrated in the datagrid like the demo...

Could you shed some light on this?

Thanks
Replied 01 Mar 2010 10:29:04
01 Mar 2010 10:29:04 Miroslav Zografski replied:
Hello Jeff,

As I mentioned in my previous post you can set a certain behavior to be executed when a certain event is fired. This is set through the Behavior connector. in Data grid there are 2 type of events - one for a single cell and one for a single row.
First - for a cell is placed in Content tab in the User Interface of the Data Grid and is presented by a paper-clip icon with Cell Behavior label.
Second - for a row is placed in Details tab in the User Interface of the Data Grid and is represented by the same paper-clip icon but with a different label: Row Behaviors.

To attach behavior on a row or cell you need to click on the paper-clip icon and a new window will pop-up. There you select the event (by clicking its name) and behavior (in your case - Control Flash MP3 Player - which is located in DMXzone sub menu in Behaviors section). Then refer to my previous post of what exactly to set there.

Regards,

Reply to this topic