Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have used gridview to show record as
XML
<asp:GridView ID="dgvMaildetail" runat="server" Width="100%" AutoGenerateColumns="False"
                                                       AllowSorting="True" DataKeyNames="md_id" AllowPaging="True" OnPageIndexChanging="dgvMaildetail_PageIndexChanging"
                                                       RowStyle-Height="15px">
                                                       <Columns>
     <asp:TemplateField HeaderText="Subject" SortExpression="md_subject">
                                                               <ItemTemplate>
                                                                   <asp:LinkButton ID="lnksubject" CausesValidation="false"
                                                                        Text='<%#Eval("md_subject") %>'
                                                                       runat="server" Width="50%"></asp:LinkButton>
                                                               </ItemTemplate>
                                                           </asp:TemplateField>
 </Columns>
                                                   </asp:GridView>

but when the source is nothing then entire grid becomes empty

with header also not being shown

please help
Posted
Updated 23-Nov-11 22:32pm
v2

 
Share this answer
 
Comments
RaviRanjanKr 25-Nov-11 2:20am    
My 5+
Anuja Pawar Indore 25-Nov-11 2:23am    
Thanks Ravi
check the property of your gridview,
set
C#
ShowHeaderWhenEmpty = true


hope it helps!
thnks,
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900