什么意思要实现表头是竖着不是横着的???
如果是这样我想你还是自己动手写一个VDataGrid吧!不过工作量可想而知。
如果只是要纵向排列数据建议你是用自己化表格的方法(动态生成Table)!
如果是这样我想你还是自己动手写一个VDataGrid吧!不过工作量可想而知。
如果只是要纵向排列数据建议你是用自己化表格的方法(动态生成Table)!
解决方案 »
- html中tabindex是怎样实现的
- asp.net中多用户同时导数据时创建唯一编号的问题?
- [讨论] 三层架构与多语言版
- 联想的笔记本电脑没有发票可以保修吗?
- asp2.0的问题,form认证后总是转到default.aspx页而不是请求页?
- 是不是我的网站被黑了?
- 请问为什么基础Page里面的ViewState在回传时不能保存状态?
- 难题难题!为什么一个.net的web站点,登陆进去之后,有的机器可以保存session的值,而有的机器一登陆,session就清空了呢??急啊!
- 谁可以告诉我有关那个"360度全景网页图片"技术的信息?
- 怎么修改下面的代码才可以支持中文输入?谢谢
- 谢谢各位!发布一个简单的程序答谢大家!
- DataList控件的重复方式可不可以横向平铺而不是纵向?
<script language = "C#" runat="server"> ICollection CreateDataSource() {
DataTable dt = new DataTable();
DataRow dr; dt.Columns.Add(new DataColumn("StringValue", typeof(string))); for (int i = 0; i < 10; i++) {
dr = dt.NewRow();
dr[0] = "Item " + i.ToString();
dt.Rows.Add(dr);
} DataView dv = new DataView(dt);
return dv;
} void Page_Load(Object Sender, EventArgs E) {
if (!IsPostBack) {
DataList1.DataSource = CreateDataSource();
DataList1.DataBind();
}
} void Button1_Click(Object Sender, EventArgs E) { if (DropDown1.SelectedIndex == 0)
DataList1.RepeatDirection = RepeatDirection.Horizontal;
else
DataList1.RepeatDirection = RepeatDirection.Vertical;
if (DropDown2.SelectedIndex == 0)
DataList1.RepeatLayout = RepeatLayout.Table;
else
DataList1.RepeatLayout = RepeatLayout.Flow;
DataList1.RepeatColumns=DropDown3.SelectedIndex+1; if ((Check1.Checked ==true) && (DataList1.RepeatLayout == RepeatLayout.Table)) {
DataList1.BorderWidth = Unit.Pixel(1);
DataList1.GridLines = GridLines.Both;
}
else {
DataList1.BorderWidth = Unit.Pixel(0);
DataList1.GridLines = GridLines.None;
}
}</script><body> <h3><font face="Verdana">Simple DataList Sample</font></h3> <form runat=server>
<font face="Verdana" size="-1"> <asp:DataList id="DataList1" runat="server"
BorderColor="black"
CellPadding="3"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
AlternatingItemStyle-BackColor="Gainsboro"
>
<HeaderTemplate>
Items
</HeaderTemplate>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "StringValue") %>
</ItemTemplate>
</asp:DataList> <p>
<hr noshade align="left" width="300px">
RepeatDirection:
<asp:DropDownList id=DropDown1 runat="server">
<asp:ListItem>Horizontal</asp:ListItem>
<asp:ListItem>Vertical</asp:ListItem>
</asp:DropDownList><br> RepeatLayout:
<asp:DropDownList id=DropDown2 runat="server">
<asp:ListItem>Table</asp:ListItem>
<asp:ListItem>Flow</asp:ListItem>
</asp:DropDownList><br> RepeatColumns:
<asp:DropDownList id=DropDown3 runat="server">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
</asp:DropDownList><br> Show Borders:
<asp:CheckBox id=Check1 runat="server" /><p> <asp:LinkButton id=Button1 Text="Refresh DataList" OnClick="Button1_Click" runat="server"/>
</font>
</form></body>
</html>