[CLOSED] Missing first of row data in Grid Panel

  1. #1

    [CLOSED] Missing first of row data in Grid Panel

    We are having the same problem defined in this thread from four years ago:

    http://forums.ext.net/showthread.php...-in-Grid-Panel

    Our record count returns, for example, returns 40, but only 39 records are displayed on the grid. The missing record is always the first in the dataset. Our backend is SQL Server. Please advise...
    Last edited by Daniil; Oct 11, 2013 at 4:39 AM. Reason: [CLOSED]
  2. #2
    Unfortunatelly, we cannot say anything concrete without sample to reproduce the issue
    You can replace DB connection by dummy DataTable
  3. #3
    hi : Regarding this previous thread: http://forums.ext.net/showthread.php...-in-Grid-Panel

    Was this previous thread above ever solved? If so - what was the solution for the above previous thread issue? We are having the exact same error as the previous thread in the URL above - so we shouldn't really need to produce further code samples.

    We are really stuck on this issue : For example: Our SQL query returns 4 rows, for certain - the row count below in: dt.Rows.Count = 4 rows, but the GridView only displays the last 3 rows. The first row of data is not displayed in the Grid View. Not sure what code you need, let's start with the code below:

            private void DataInitTeacherAssignments()
            {
                    string sSQL = this._libAssignments.sTeacherViewList(
                    _sTop40_OrBlank,
                    _VAExtSession.PeopleID,
                    _VAExtSession.SelectedStudentPeopleID,
                    ExtHidden_sFilterStatus.Text,
                    ExtHidden_sFilterCategory.Text);
    
    		DataSet ds = _DB.general_SQL("va", sSQL);
    		DataTable dt = ds.Tables[0];
    		this._nAssignmentsCount = dt.Rows.Count;
    
    		_storeAssignments.DataSource = dt;
                    _storeAssignments.DataBind();
            }
    						
    
    <ext:GridPanel ID="_grdAssignments" runat="server" Visible="true" Hidden="false" > <Store> <ext:Store ID="_storeAssignments" runat="server" > <Model> <ext:Model ID="modelAssignments" runat="server" IDProperty="AssignmentID"> <Fields> <ext:ModelField Name="AssignmentID" Type="Int" /> <ext:ModelField Name="TeacherStudentName" /> <ext:ModelField Name="Category" /> <ext:ModelField Name="Description" /> <ext:ModelField Name="DateAssigned" Type="Date" DateFormat= "c" /> <ext:ModelField Name="DateDue" Type="Date" DateFormat="c"/> <ext:ModelField Name="Status" /> <ext:ModelField Name="CurrentUserName" /> <ext:ModelField Name="TeachersNotes" /> <ext:ModelField Name="StudentsNotes" /> <ext:ModelField Name="Student_People_id" Type="Int" /> <ext:ModelField Name="Teacher_People_id" Type="Int"/> </Fields> </ext:Model> </Model> </ext:Store> </Store> <ColumnModel> <Columns> <ext:Column ID="_colTeacherStudentName" runat="server" Text="TeacherStudentName" DataIndex = "TeacherStudentName" Flex="90" /> <ext:Column ID="_colCategory" runat="server" Text="Category" DataIndex = "Category" Flex="76" /> <ext:Column ID="_colDescription" runat="server" Text="Description" DataIndex = "Description" Flex="200" /> <ext:DateColumn ID="_colDateAssigned" runat="server" Text="Assigned" DataIndex = "DateAssigned" Flex="65" Format="MM/dd/yyyy" /> <ext:DateColumn ID="_colDateDue" runat="server" Text="Due" DataIndex = "DateDue" Flex="65" Format="MM/dd/yyyy" /> <ext:Column ID="_colStatus" runat="server" Text="Status" DataIndex = "Status" Flex="70" /> <ext:Column ID="_colTeachersNotes" runat="server" Text="TeacherNotes" DataIndex = "TeachersNotes" Flex="5" Hidden="true" /> <ext:Column ID="_colStudentsNotes" runat="server" Text="StudentNotes" DataIndex = "StudentsNotes" Flex="5" Hidden="true" /> <ext:Column ID="_colStudentPeopleID" runat="server" Text="Student ID" DataIndex = "Student_People_id" Flex="5" Hidden="true" /> <ext:Column ID="colTeacherPeopleID" runat="server" Text="Teacher ID" DataIndex = "Teacher_People_id" Flex="5" Hidden="true" /> </Columns> </ColumnModel> <SelectionModel> <ext:RowSelectionModel ID="rsmAssignments" runat="server" Mode="Single"> <%-- <DirectEvents> <Select OnEvent="rsmAssignments_OnSelect" CleanRequest="false" > <ExtraParams> <ext:Parameter Name="_selID" Value="this.getSelected().sID" Mode="Value" /> <ext:Parameter Name="_selCategory" Value="record.get('Category')" Mode="Value" /> </ExtraParams> </Select> </DirectEvents>--%> </ext:RowSelectionModel> </SelectionModel> <View> <ext:GridView ID="GridView1" runat="server" EmptyText="No data to Display" /> </View> </ext:GridPanel>
  4. #4
    Hello!

    It's difficult to say what is wrong without sample to reproduce. In your sample above you load data from DataBase, which we don't have. You should create the same sample but with dummy data instead of data query.

    Please, read the following thread: http://forums.ext.net/showthread.php?10205
  5. #5
    When we use the following code sample, all three records are read into the grid correctly:

        protected void Page_Load(object sender, EventArgs e)
        {
          if (!X.IsAjaxRequest)
          {
            this._storeAssignments.DataSource = this.TestData;
            this._storeAssignments.DataBind();
          }
        }
    
        public object[] TestData
        {
          get
          {
            return new object[]
                {
                    new object[] { 282, "Abe Lange", "Performance", "test for Abe", "9/24/2013", "9/30/2013", "Assigned", "jharris", "TNotes", "SNotes", 867, 53 },
                    new object[] { 281, "Julie Harris", "Theory", "Test for Julie", "9/20/2013", "9/24/2013", "Assigned", "jharris", "TNotes", "SNotes", 53, 53 },
                    new object[] { 283, "Gabriel Crist", "Composition", "Test for Gabe", "9/16/2013", "9/19/2013", "InProgress", "jharris", "TNotes", "SNotes", 866, 53 },
    
                };
          }
        }
    However when we do exactly the same thing with a SQL database, the grid contains all the correct data EXCEPT THE FIRST ROW.

    
                DataSet ds = _DB.general_SQL("va", sSQL);
                DataTable dt = ds.Tables[0];
                this._nAssignmentsCount = dt.Rows.Count;
    
                _storeAssignments.DataSource = dt;
                _storeAssignments.DataBind();
    We don't see any way to send you a code sample that will replicate the error, since the error does not occur with test data. Would screen shots help?

    Please note that dt.Rows.Count in the above example returns the CORRECT number of rows, but the grid displays one row less than this count.
    Also note that when we sort the grid in a different order, the "missing" record appears and a different record goes missing.
    In other words, ALL the data is being read in, but the first record is never displayed in the grid.

    Can you please help us? Our entire project is on hold because of this error. This is exactly the same error that was reported over four years ago, and surely someone else is using SQL DB to populate a grid? Help!!
  6. #6
    Please post the Page Sources. To get the Page Sources you can run the problem page in FireFox and press Ctrl+U.
  7. #7
    Here is the PageSources listing you requested. Please advise.

    <!DOCTYPE html>
    <html xmlns:fb="http://ogp.me/ns/fb#"  xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr">
    <head>
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <base href="http://virtualartists.net/developers/assignments" />
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <meta name="generator" content="Joomla! - Open Source Content Management" />
      <title>Assignments</title>
      <link href="http://virtualartists.net/developers/assignments" rel="canonical" />
      <link href="/templates/protostar/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
      <link rel="stylesheet" href="/templates/protostar/css/template.css" type="text/css" />
      <script src="/media/jui/js/jquery.min.js" type="text/javascript"></script>
      <script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>
      <script src="/media/jui/js/bootstrap.min.js" type="text/javascript"></script>
      <script src="/templates/protostar/js/template.js" type="text/javascript"></script>
      <script type="text/javascript">
    jQuery(document).ready(function()
    				{
    					jQuery('.hasTooltip').tooltip({"container": false});
    				});
      </script>
      <script type='text/javascript'>
    				/*<![CDATA[*/
    					var jax_live_site = 'http://virtualartists.net/index.php';
    					var jax_token_var='5af8258e1e84c9f6530106a78496b707';
    				/*]]>*/
    				</script><script type="text/javascript" src="http://virtualartists.net/plugins/system/azrul.system/pc_includes/ajax_1.5.pack.js"></script>
    
          <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
        <style type="text/css">
          h1,h2,h3,h4,h5,h6,.site-title{
            font-family: 'Open Sans', sans-serif;
          }
        </style>
          <style type="text/css">
        body.site
        {
          border-top: 3px solid #0088cc;
          background-color: #f4f6f7    }
        a
        {
          color: #0088cc;
        }
        .navbar-inner, .nav-list > .active > a, .nav-list > .active > a:hover, .dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover, .nav-pills > .active > a, .nav-pills > .active > a:hover,
        .btn-primary
        {
          background: #0088cc;
        }
        .navbar-inner
        {
          -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1), inset 0 30px 10px rgba(0, 0, 0, .2);
          -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1), inset 0 30px 10px rgba(0, 0, 0, .2);
          box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1), inset 0 30px 10px rgba(0, 0, 0, .2);
        }
      </style>
        <!--[if lt IE 9]>
        <script src="/media/jui/js/html5.js"></script>
      <![endif]-->
    </head>
    
    <body class="site com_wrapper view-wrapper no-layout no-task itemid-570 fluid">
    
      <!-- Body -->
      <div class="body">
        <div class="container-fluid">
    
          <!-- Header -->
          <header class="header" role="banner">
            <div class="header-inner clearfix">
              <!-- 2013.08.16.ctharris:Changed: -->
              <!-- Changed: Removed Header Below:
              <a class="brand pull-left" href="/">
                <span class="site-title" title="VirtualArtists Studio">VirtualArtists Studio</span>           </a>
               -->
              <div class="header-search pull-right">
                
              </div>
            </div>
          </header>
                <nav class="navigation" role="navigation">
            <ul class="nav menu nav-pills">
    <li class="item-546"><a href="http://virtualartists.com/page/home" >Community</a></li><li class="item-552"><a href="/" >MyDashboard</a></li><li class="item-553"><a href="/mystudents" >MyStudents</a></li><li class="item-554"><a href="/myinfo" >MyInfo</a></li><li class="item-555"><a href="/mycalendar" >MyCalendar</a></li><li class="item-556"><a href="/lendinglibrary" >MyLendingLibrary</a></li><li class="item-558"><a href="/people" >People</a></li><li class="item-559"><a href="/dictionaries" >Dictionaries</a></li><li class="item-560"><a href="/theory" >Theory</a></li><li class="item-561"><a href="/composition" >Composition</a></li><li class="item-562"><a href="/history" >History</a></li><li class="item-563"><a href="/performance" >Performance</a></li><li class="item-564"><a href="/resources" >Resources</a></li><li class="item-435 deeper parent"><a href="/help" >Help</a><ul class="nav-child unstyled small"><li class="item-550"><a href="/help/contactus" >ContactUs</a></li><li class="item-565"><a href="/help/version" >Version</a></li></ul></li><li class="item-551"><a href="/administrators" >Administrators</a></li><li class="item-515 active deeper parent"><span class="nav-header">Developers</span><ul class="nav-child unstyled small"><li class="item-513"><a href="/developers/devhome" >DevHome</a></li><li class="item-514"><a href="/developers/frmjoomlavwghost" >frmJoomlaVWGHost</a></li><li class="item-525"><a href="/developers/extnet-form" >ExtNet-Form</a></li><li class="item-547"><a href="/developers/dev" >Dev</a></li><li class="item-491"><a href="/developers/mycolleagues" title="My private studio colleagues" >MyColleagues</a></li><li class="item-541 deeper parent"><span class="nav-header">MyBriefcase</span><ul class="nav-child unstyled small"><li class="item-542"><a href="/developers/mybriefcase/my-files" >MyFiles</a></li><li class="item-543"><a href="/developers/mybriefcase/private-files" >MyPrivateFiles</a></li><li class="item-544"><a href="/developers/mybriefcase/public-files" >MyPublicFiles</a></li></ul></li><li class="item-511"><a href="https://soft-designs.vosibiz.com/file/ShowFolder.aspx" target="_blank" >MyCloudDrive</a></li><li class="item-545"><a href="/developers/englishmedia" >EnglishMedia</a></li><li class="item-567"><a href="/developers/devjumi" >DevJumi</a></li><li class="item-568"><a href="/developers/devsqlserver" >DevSQLServer</a></li><li class="item-569"><a href="/developers/devpost" >DevPost</a></li><li class="item-570 current active"><a href="/developers/assignments" >Assignments</a></li><li class="item-571"><a href="/developers/devextgrid" >DevExtGrid</a></li></ul></li></ul>
    
          </nav>
                
          <div class="row-fluid">
                    <main id="content" role="main" class="span12">
              <!-- Begin Content -->
              
              
    <div id="system-message-container">
    <div id="system-message">
    </div>
    </div>
              <script type="text/javascript">
    function iFrameHeight()
    {
    	var h = 0;
    	if (!document.all)
    	{
    		h = document.getElementById('blockrandom').contentDocument.height;
    		document.getElementById('blockrandom').style.height = h + 60 + 'px';
    	} else if (document.all)
    	{
    		h = document.frames('blockrandom').document.body.scrollHeight;
    		document.all.blockrandom.style.height = h + 20 + 'px';
    	}
    }
    </script>
    <div class="contentpane">
    <iframe 	id="blockrandom"
    	name="iframe"
    	src="http://www.soft-designs.com/stage/vaExt/ModuleOpen.aspx?m=AssignmentsSummary"
    	width="705"
    	height="605"
    	scrolling="no"
    	frameborder="1"
    	class="wrapper">
    	This option will not work correctly. Unfortunately, your browser does not support inline frames.</iframe>
    </div>
    
              
    <ul class="breadcrumb">
    	<li class="active"><span class="divider icon-location hasTooltip" title="You are here: "></span></li><li><a href="/" class="pathway">Home</a><span class="divider"><img src="/media/system/images/arrow.png" alt="" /></span></li><li><span>Developers</span><span class="divider"><img src="/media/system/images/arrow.png" alt="" /></span></li><li><span>Assignments</span></li></ul>
    
              <!-- End Content -->
            </main>
                  </div>
        </div>
      </div>
      <!-- Footer -->
      <footer class="footer" role="contentinfo">
        <div class="container-fluid">
          <hr />
          
          <p class="pull-right"><a href="#top" id="back-top">Back to Top</a></p>
          <p>&copy; VirtualArtists Studio 2013</p>
        </div>
      </footer>
      
    <noscript><strong>JavaScript is currently disabled.</strong>Please enable it for a better experience of <a href="http://2glux.com/projects/jumi">Jumi</a>.</noscript></body>
    </html>
  8. #8
    It is not an Ext.NET page. I need the page with the Store where you bind the data from the database.
    Last edited by Daniil; Oct 11, 2013 at 4:36 AM.
  9. #9

    Answer?

    Any answer to this question? Because my friend is experiencing the same issue here.
    Loading from SQL Database, data is loaded completely, from 5 data loaded, but only 4 is displayed, even though in paging bar, it say showing 1 - 5 from 5 record.
    When we sort one of the column, the missing data showed but another data (first in sort order) is missing.
  10. #10

    Found it!

    Never mind, I found it already.
    It's because of IDProperty in the Model.
    My data contains more than 1 record for 1 IDProperty.
    Just use model without IDProperty and it's perfect.

    Thanks.

Similar Threads

  1. Missing first record in Grid Panel
    By dkroy in forum 1.x Help
    Replies: 1
    Last Post: Oct 01, 2013, 3:58 AM
  2. [CLOSED] [URGENT - Need Help ] ux is missing ( grid live data search )
    By Pyropace in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 21, 2013, 5:54 PM
  3. Replies: 13
    Last Post: Feb 28, 2013, 2:06 PM
  4. Retieving Data from data base in the Grid Panel
    By Rakeshkumar.a in forum 1.x Help
    Replies: 0
    Last Post: Oct 13, 2010, 6:18 AM
  5. [CLOSED] something is missing. Grid not loading data from List<>
    By alexp in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 14, 2009, 11:57 AM

Posting Permissions