[CLOSED] Missing first of row data in Grid Panel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  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.

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