Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
Hi,
 
Gridview inside a fieldset as below
 
  <fieldset id="fieldSet" style="display: block;width:99%;vertical-align: text-top;">
     <legend>Student Report</legend>
     <table border="0" width="100%">
      <tr>
       <td>   
       <br />
           <asp:UpdatePanel runat="server" ID="updtPanel">
           <ContentTemplate>
           <div id="scrolldiv">      
                             
           <asp:GridView ID="studentReportGrid" runat="server" AutoGenerateColumns="false" HeaderStyle-BackColor="#0080C0" 
           HeaderStyle-Width="200" HeaderStyle-ForeColor="White" Width="100%" RowStyle-HorizontalAlign="Left" AllowPaging="true" PageSize="3"  
           OnPageIndexChanging="studentReportGrid_PageIndexChanging"> 
            <Columns>  
             <asp:templatefield HeaderText="Date&time" HeaderStyle-HorizontalAlign="Left">
              <itemtemplate>
              </itemtemplate>
             </asp:templatefield>
             <asp:BoundField DataField="STUDENT_NAME" HeaderText="Student name" ReadOnly="True"  HeaderStyle-HorizontalAlign="Left" />     
             <asp:BoundField DataField="STUDENT_ID" HeaderText="Id"  HeaderStyle-HorizontalAlign="Left"/>                  
             <asp:BoundField DataField="VEHICLE_NUMBER" HeaderText="Vehicle_no"  HeaderStyle-HorizontalAlign="Left"/>
             <asp:templatefield HeaderText="Entry_location" HeaderStyle-HorizontalAlign="Left">
              <itemtemplate>
              </itemtemplate>
             </asp:templatefield>
             <asp:templatefield HeaderText="Exit_location" HeaderStyle-HorizontalAlign="Left">
              <itemtemplate>
              </itemtemplate>
            </asp:templatefield>
           </Columns>
          </asp:GridView> 
          </div>
          </ContentTemplate>
          <Triggers>
            <asp:AsyncPostBackTrigger ControlID="generateReportbtn" EventName="click" />
            <asp:AsyncPostBackTrigger ControlID="hdnBtn" EventName="click" />          
         </Triggers>
         </asp:UpdatePanel>          
       </td>
      </tr>
      <tr>
       <td>
       </td>
      </tr>                
   </table>
  </fieldset> 
 
When i see the page in browser, gridview is missing. what could be the reason?
 

Thanks..
Posted 10-Jan-13 23:09pm
hasbina1.2K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

check the properties of your div that contains the grid i.e.,
<div id="scrolldiv">
 
ensure that you are not using any css on it that restricts it's width/height and/or visibility.
 
Regards
Pawan
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

First put this tag in your gridview control and check there is data or not...
 
<EmptyDataTemplate>no record found</EmptyDataTemplate>
 
AND
Where is your DATASOURCE..???
(if datasource in code then you applied databind() function after it or not)..
place your datasource code also in your question for detail
 

Thank you
Asp.Net/C#.Net Help[^]
Hemant Singh
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Possiblities are in scrolldiv(check out the CSS code).or the dataset does not return any resultset.
 
Thanks
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Hello,
 
I Think You not Provide Any Data Sourec Either In Code Behinf or Source Code It Thats why Your GridView Not Display Any Data.
And Of Cause If Your DataSource Empty Than it will not give any Records For That Case used
<EmptyDataTemplate>no record found</EmptyDataTemplate>
 
I hope Your Problem Will Solve If Not Please Give Your Comment....
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 901
1 OriginalGriff 445
2 CPallini 255
3 Richard Deeming 175
4 George Jonsson 161
0 OriginalGriff 5,540
1 Sergey Alexandrovich Kryukov 4,668
2 CPallini 4,540
3 George Jonsson 3,102
4 Gihan Liyanage 2,445


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 11 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100