help in datasets in dreamweaver mx
-
Hi, I have a MS access database of product's table namely with fields imagefile, product_id, name, cost and 4 different products added. I created a table 2 rows 2 cols in products.aspx, i have the database connected, datasets up and i wish to display the 4 products into this 2 row 2 col table i created, how is that possible? Earlier i setup'd a datagrid and managed to list all of the products in one table but i can't do anything to it and it is not the table i want. How do i pull individual product id and its other info in each of my cols in my table rows.. Thanks, Josh
-
Hi, I have a MS access database of product's table namely with fields imagefile, product_id, name, cost and 4 different products added. I created a table 2 rows 2 cols in products.aspx, i have the database connected, datasets up and i wish to display the 4 products into this 2 row 2 col table i created, how is that possible? Earlier i setup'd a datagrid and managed to list all of the products in one table but i can't do anything to it and it is not the table i want. How do i pull individual product id and its other info in each of my cols in my table rows.. Thanks, Josh
What you can do is to create a repeated region which loops through the dataset adding the appropriate code. Go to Insert -> Application Objects - > Repeating region. You can set the number of repeats for this region. Also, you can set a datasource for it. This means that each time the region repeats it will navigate to the next row in your table. Will look similar to below
Ie ASP:Repeater runat="server" DataSource='<%# MyDsTable.DefaultView %>
Within this region, place the code that you'd like to see repeated.Ie. <%# MyDsTable.FieldValue("Field1", Container) %> <%# MyDsTable.FieldValue("Field2", Container) %>
This will create a new row for your table for each record in the dataset for however many times you repeat that region. Make sense? _____________________ Don't take out the Magic Pen, Don't draw on the Infinity Board - Neil Young -
What you can do is to create a repeated region which loops through the dataset adding the appropriate code. Go to Insert -> Application Objects - > Repeating region. You can set the number of repeats for this region. Also, you can set a datasource for it. This means that each time the region repeats it will navigate to the next row in your table. Will look similar to below
Ie ASP:Repeater runat="server" DataSource='<%# MyDsTable.DefaultView %>
Within this region, place the code that you'd like to see repeated.Ie. <%# MyDsTable.FieldValue("Field1", Container) %> <%# MyDsTable.FieldValue("Field2", Container) %>
This will create a new row for your table for each record in the dataset for however many times you repeat that region. Make sense? _____________________ Don't take out the Magic Pen, Don't draw on the Infinity Board - Neil YoungThanks! help'd a lot =) I managed to repeat my first 4 items as below. id product name -- -- OS1001 Microsoft Windows XP Home OS1002 Microsoft Windows XP Pro OS1003 Microsoft Windows 2000 OS1004 Microsoft Windows ME How do i choose, say I do not want OS1001-1004, i would like to list the 4th - 8th item in the same table? basically to choose what to list.. instead of having it pick first 4 items fr the table. Where can i get samples or tutorials for this exact method to use dreamweaver datasets? Please help me, thanks. Thanks.