GridView.EmptyDataRowStyle Property
2013-09-10 15:39
295 查看
原帖地址:http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.emptydatarowstyle.aspx
<%@ Page language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>GridView EmptyDataTemplate Example</title> </head> <body> <form id="form1" runat="server"> <h3>GridView EmptyDataTemplate Example</h3> <asp:gridview id="CustomersGridView" datasourceid="CustomersSqlDataSource" autogeneratecolumns="true" runat="server"> <emptydatarowstyle backcolor="LightBlue" forecolor="Red"/> <emptydatatemplate> <asp:image id="NoDataImage" imageurl="~/images/Image.jpg" alternatetext="No Image" runat="server"/> No Data Found. </emptydatatemplate> </asp:gridview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Northwind sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the Web.config file. The following query --> <!-- returns an empty data source to demonstrate the --> <!-- empty row. --> <asp:sqldatasource id="CustomersSqlDataSource" selectcommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers] Where CustomerID='NoID'" connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>" runat="server"> </asp:sqldatasource> </form> </body> </html>
相关文章推荐
- dlopen failed: empty/missing DT_HASH in "libx.so" (built with --hash-style=gnu?)
- 得GridView的EmptyDataTemplate中的控件 (来自CSDN)
- GridView EmptyDataTemplate: Get Rid of That Annoying Border!
- invalid property name "style"?
- gridview中去掉style属性中的border-collapse:
- style,getComputedStyle,currentStyle,defaultView,getPropertyValue
- According to TLD, tag s:property must be empty, but is not
- tag s:property must be empty, but is not错误原因
- A fine property of the non-empty countable dense-in-self set in the real line
- GridView的 EmptyDataTemplate与 ShowHeaderWhenEmpty属性
- DataList在无数据记录时显示类似GridView空模板(EmptyDataTemplate)
- js提示Cannot read property 'style' of undefined
- javascript getComputedStyle,getPropertyValue,CurrentStyle说明
- gridview无法绑定datarow[]的解决
- GridView Style
- 在ListView中使用GridView, Style这样写:
- 关于在vs2005下的gridview中去掉style属性中的border-collapse:collapse;的方法
- JavaScript特性(attribute)、属性(property)和样式(style)
- GridView HeaderStyle unbold 实现
- 从源码上分析ListView/GridView调用setEmptyView不起作用的原因及解决办法