"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Saturday, July 3, 2010

Display an Image when the GridView has no data

Hi,
Display an image when their is no data in the gridview.

demo
code

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
    DataSourceID="SqlDataSource1"
   
ShowFooter="true" AllowPaging="True" AllowSorting="True">

<
EmptyDataTemplate>
  <
asp:Image id="imgOne"
   
ImageUrl="~/images/Emptydata.jpg"
   
AlternateText="No results"
   
runat="server"/>
</
EmptyDataTemplate>


sample code 



 Professional DevExpress<sup><small>TM</small></sup> ASP.NET ControlsGridview, Style A, 12/bxASP.NET Data Web Controls Kick Start
Have a nice day... 'N happy Coding :)

No comments: