Forum
smartDBforms.NET for ASP.NET 2
 
 
Knowledge Base Forum
To post messages on the forum, you need to login first.
SearchForum Home
  Product Forums  smartDBforms.NET  Repeater comman...
 Repeater command
 
 5/31/2010 11:46:58 PM
David
10 posts


Repeater command

If I have a table in an SQL db that has 12 rows of data (questionaire/survey) that I want to appear (without edit) on one form without paging. Can this done, if so how?? I tried the repeater code with no success in ASP area of the form it did not bind to the smartdbform. I was able to create one quetion on the form with paging but it will cause too many clicks and is beyond me how to capture all of the rows into one answer collection table for the form

Also in the ad it states you can create multy boolean selction groups (matrix).

These same questions contain a 1-5 answer selection that I want to offer a 1-5 radio button and capture back only 1 result. Ho wis this done

 

thanks

 6/1/2010 4:47:14 PM
Adillis Support
43 posts
adillis.com


Re: Repeater command

Hi David,

In order to display multiple SmartDBView forms ( one for each row ) the SmartDBView itself should be put inside the Repeater.
The Repeater and SmartDBView DataSourceID property should reference the same SmartDataSource. The trick is that the SmartDBView.RowIndex should be incremented for each row in Repeater. This can be done with DataBind expression against the  RepeaterItem.ItemIndex.

For example:
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SmartDataSource1">
    <ItemTemplate>
    <smartDBforms:SmartDBView ID="SmartDBView1" runat="server" DataSourceID="SmartDataSource1" Width="485px" DefaultMode="ReadOnly"
     RowIndex='<%# Container.ItemIndex%>' >
        <Content>
            <smartDBforms:SmartDBControl ID='ctrlCategoryID' Field='CategoryID' runat='server'/><br/>
            <smartDBforms:SmartDBControl ID='ctrlCategoryName' Field='CategoryName' runat='server'/><br/>
            <smartDBforms:SmartDBControl ID='ctrlDescription' Field='Description' runat='server'/><br/>
            <smartDBforms:SmartDBControl ID='ctrlPicture' Field='Picture' runat='server'/>
        </Content>
     </smartDBforms:SmartDBView>
    </ItemTemplate>
</asp:Repeater>


For a full example which shows all rows in the Northwind Category table download SmartDBViewInsideRepeater.zip.

Another way would be to use master-detail design. For example you can see the Suppliers Demo page.

If you have any other questions, we will be more than happy to help you.
Best wishes,
Adillis Support
Adillis - IT solutions http://adillis.com

  Product Forums  smartDBforms.NET  Repeater comman...
Copyright 2006-2010 Adillis Terms Of Use Feedback Contact Us