int rows = DatasetName.fill(dataadapter,"tablename"); if(rows <= 0) { //Add a row to data grid and display your msg } else { //do what needs to be done }
<EmptyDataTemplate> <table width="100%"> <tr> <td class="ob_gNRM" style="height: 40px; text-align: center"> There are no records available. </td> </tr> </table> </EmptyDataTemplate>
<asp:gridview id="GridView1" datakeynames="Id" emptydatatext="No Records" showheader="true" runat="server" autogeneratecolumns="False" allowpaging="True" xmlns:asp="#unknown"> /* Bind Your GridView with DataSet and set [EmptyDataText]="No Record" </asp:gridview>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)