我正在使用asp.net Web表单。我有一个8列的网格。我想使此网格响应。因此,我正在尝试将其转换为中继器控件。我可以将其作为表放置,也可以向其中添加引导CSS。但是表不会分解为较小屏幕中的列。所以我想在转发器控件内添加一个引导网格。任何机构都可以向我提供示例ui代码。
<div class="row">
<div class="col-md-12 table table-bordered">
<asp:Repeater ID="rpActions" runat="server"
DataSourceID="sqlActions">
<HeaderTemplate>
<div class="row table-bordered">
<div class="col-md-1 col-sm-5 ">
Edit
</div>
<div class="col-md-2 col-sm-5">
DateCreated
</div>
<div class="col-md-2 col-sm-5">
ActionTypeID
</div>
<div class="col-md-1 col-sm-5">
AddedByUser
</div>
<div class="col-md-2 col-sm-5">
ContactID
</div>
<div class="col-md-1 col-sm-5">
Notes
</div>
<div class="col-md-1 col-sm-5">
FollowUp
</div>
<div class="col-md-1 col-sm-5">
FollowUp
</div>
</div>
</HeaderTemplate>
<ItemTemplate>
<div class="row table-bordered ">
<div class="col-md-1 border col-sm-5">Edit</div>
<div class="col-md-2 border col-sm-5">
<asp:Label ID="LabelDateCreated" runat="server"
Text='<%# Bind("DateCreated") %>'>
</asp:Label></div>
<div class="col-md-2">
<asp:DropDownList ID="DropDownList10" runat="server" DataSourceID="SqlDataSource1a" DataTextField="ActionType" DataValueField="ActionTypeID" SelectedValue='<%# Bind("ActionTypeID") %>' AppendDataBoundItems="True">
<asp:ListItem Value="" Text="">
</asp:ListItem>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1a" runat="server" ConnectionString="<%$ ConnectionStrings:WebCRMProCS %>" SelectCommand="SELECT [ActionTypeID], [ActionType] FROM [tblActionTypes] ORDER BY [ActionType]">
</asp:SqlDataSource>
</div>
<div class="col-md-1 col-sm-5">
<asp:Label ID="LabelUser" runat="server" Text='<%# Bind("AddedByUser") %>'>
</asp:Label></div>
<div class="col-md-2 col-sm-5">
<asp:DropDownList ID="DropDownList13"
runat="server" DataSourceID="SqlDataSource1e" DataTextField="ContactFullName"
DataValueField="ContactID" SelectedValue='<%# Bind("ContactID") %>' AppendDataBoundItems="True">
<asp:ListItem Value="" Text="">
</asp:ListItem>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1e"
runat="server" ConnectionString="<%$ ConnectionStrings:WebCRMProCS %>"
SelectCommand="SELECT [ContactID],
isnull([ContactFullName], email) as ContactFullName
FROM [tblContacts] WHERE ([CompanyID] = @CompanyID)
ORDER BY [ContactFullName]">
<SelectParameters>
<asp:ControlParameter
ControlID="detailCompany" Name="CompanyID" PropertyName="SelectedValue" />
</SelectParameters>
</asp:SqlDataSource></div>
<div class="col-md-1 col-sm-5">
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Notes") %>'></asp:Label></div>
<div class="col-md-1 col-sm-5">
<asp:CheckBox ID="chkFollowup" runat="server" Checked='<%# Bind("FollowUp") %>' /></div>
<div class="col-md-1 col-sm-5">
<asp:Label ID="Label1a" runat="server"
Text='<%# Bind("DateFollowUp", "{0:d}") %>'></asp:Label> </div>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
</div>