|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
GridView ASP.NET 2.0 QuestionHi, I'm using a GridView and an ObjectDataSource to display data.
How can I display a "No records found" message if there are no query results? Currently, I'm getting a blank page since the GridView has nothing to display. Thanks The GridView has an EmptyDataTemplate for when there are no rows.
-Brock http://staff.develop.com/ballen Show quoteHide quote > Hi, I'm using a GridView and an ObjectDataSource to display data. > > How can I display a "No records found" message if there are no query > results? > > Currently, I'm getting a blank page since the GridView has nothing to > display. > > Thanks > Hi,
Use the "EmptyDataText property" of the grid view. Ex: <asp:GridView ID="GridView1" EmptyDataText="No timesheets entered." EmptyDataRowStyle-CssClass ="EmptyText" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"> Thanks and Regards, S.Ramalingam
Classic ASP String Manipulation - NOT .net
Server Side Custom Validation not running Programatically Databinding controls within a Repeater DataGrid Conditional Formatting MaxLenth doesn't work Master Pages session variables Populate dropdown/listbox My WebControls stopped working Passing Values into Formview or DetailsView formview |
|||||||||||||||||||||||