- Home
- Forum
- ASP.NET MVC
- Grid rows disappear when adding rows with PageSize set
Grid rows disappear when adding rows with PageSize set
If I add a row to a grid when (a) PageSize is set and (b) the current grid page is full, a row that should be displayed in the grid disappears to make room for the "add new" row. If I add another row, yet another row disappears, until I'm left with a seemingly empty grid. I would expect the "add new" row to appear without removing a row from the grid, even though this would temporarily show more rows in the grid than the PageSize setting. I've attached a video demonstrating the problem.
Attachment: custscroll_92ddcc15.zip
Attachment: custscroll_92ddcc15.zip
SIGN IN To post a reply.
6 Replies
RB
R Brian Lindahl
December 12, 2016 03:48 PM UTC
Also, once the grid is "empty", the add new row doesn't show up at all. I have to switch pages to be able to add more items.
PK
Prasanna Kumar Viswanathan
Syncfusion Team
December 13, 2016 10:47 AM UTC
Hi Brian,
Thanks for contacting Syncfusion support.
In grid when we set allowPaging as true, it will set pageSize as 12 by default or we can set the pageSize in pageSettings. While adding new record in the current page the last record will be moved to the next page when it exceeds the pageSize.
We checked your video demonstration and before proceed with this query, share the following details.
1. In video we found that the newly added record is not saved. So, we suspect that the script has been thrown while saving the newly added record. If any error thrown in the console, please share the stackrace of an issue.
2. Are you using any adaptors like URL or remoteSave in grid?
3. Code example of a Grid.
3. Essential Studio Version details.
Regards,
Prasanna Kumar N.S.V
RB
R Brian Lindahl
December 22, 2016 03:57 AM UTC
1. The records are saved, they're just not visible on the first page of the grid.
2. Adaptor is UrlAdaptor.
3. Sample code is attached.
4. Version is latest, 2016 release 4.
VS info is:
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Enterprise
Architecture and Modeling Tools 00322-80000-00000-AA973
Microsoft Architecture and Modeling Tools
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.
Visual Basic 2015 00322-80000-00000-AA973
Microsoft Visual Basic 2015
Visual C# 2015 00322-80000-00000-AA973
Microsoft Visual C# 2015
Visual C++ 2015 00322-80000-00000-AA973
Microsoft Visual C++ 2015
Windows Phone SDK 8.0 - ENU 00322-80000-00000-AA973
Windows Phone SDK 8.0 - ENU
Add New File 3.5
The fastest and easiest way to add new files to any project - including files that start with a dot
ASP.NET and Web Tools 2015.1 14.1.20907.0
ASP.NET and Web Tools 2015.1
ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/
Azure App Service Tools v2.8.1 14.0.11123.0
Azure App Service Tools v2.8.1
Bundler & Minifier 2.2.307
Adds support for bundling and minifying JavaScript, CSS and HTML files in any project.
Clang with Microsoft CodeGen 14.0.25516
Clang with Microsoft CodeGen
Command Bus, Event Stream and Async Manager Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.
Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
File Icons 2.3
Adds icons for files that are not recognized by Solution Explorer
File Nesting 2.6.67
Automatically nest files based on file name and enables developers to nest and unnest any file manually
GitHub.VisualStudio 2.1.1.5
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
Image Optimizer 3.6.103
Uses industry standard tools to optimize any JPEG, PNG and Gifs - including animated Gifs. Can do both lossy and lossless optimization.
Image Sprites 1.4.47
Boost your website's performance by creating image sprites to reduce the amount of HTTP requests needed.
JavaScript Language Service 2.0
JavaScript Language Service
JavaScript Project System 2.0
JavaScript Project System
KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info
Markdown Editor 1.10.186
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.
Microsoft .NET Core Tools (Preview 2) 14.1.20907.0
Microsoft .NET Core Tools (Preview 2)
Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Mono Debugging for Visual Studio Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Open Command Line 2.1.179
Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.
Package Installer 2.0.99
Makes it easier, faster and more convenient than ever to install Bower, npm, Yarn, JSPM, TSD, Typings and NuGet packages to any project
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Data Tools 14.0.60519.0
Microsoft SQL Server Data Tools
Syncfusion ASP.NET MVC (Mobile) Extension 14.4.0.15
Provides Project Templates to create Syncfusion ASP.NET MVC (Mobile) projects.
Syncfusion Web Conversion and Migration 14.4.0.15
Converts and migrates a web project into a Syncfusion web project.
Syncfusion.VSExtension.Troubleshooter 14.1.0.41
Add-in for Troubleshooting the Syncfusion projects.
Syntax Highlighting Pack 2.3.100
Adds syntax highlighting and snippet support for a wide variety of programming languages such as Clojure, Go, Jade, Lua, Swift, Ruby and many more...
TypeScript 1.8.36.0
TypeScript tools for Visual Studio
Visual C++ for Cross Platform Mobile Development (Android) 14.0.25401.00
Visual C++ for Cross Platform Mobile Development (Android)
Visual C++ for Cross Platform Mobile Development (iOS) 14.0.25401.00
Visual C++ for Cross Platform Mobile Development (iOS)
Visual Studio Tools for Apache Cordova Update 10
Visual Studio Tools for Apache Cordova
Visual Studio Tools for Universal Windows Apps 14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Web Accessibility Checker 1.3.37
The easiest way to perform accessibility checks on any ASP.NET web application. Fully customizable and support all the major international accessibility standards.
Web Compiler 1.11.326
Compiler for LESS, Sass and CoffeeScript files
Web Essentials 2015.3 3.0.235
Adds many useful features to Visual Studio for web developers. Requires Visual Studio 2015
Attachment: WebApplication12_97e7435b.zip
2. Adaptor is UrlAdaptor.
3. Sample code is attached.
4. Version is latest, 2016 release 4.
VS info is:
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586
Installed Version: Enterprise
Architecture and Modeling Tools 00322-80000-00000-AA973
Microsoft Architecture and Modeling Tools
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.
Visual Basic 2015 00322-80000-00000-AA973
Microsoft Visual Basic 2015
Visual C# 2015 00322-80000-00000-AA973
Microsoft Visual C# 2015
Visual C++ 2015 00322-80000-00000-AA973
Microsoft Visual C++ 2015
Windows Phone SDK 8.0 - ENU 00322-80000-00000-AA973
Windows Phone SDK 8.0 - ENU
Add New File 3.5
The fastest and easiest way to add new files to any project - including files that start with a dot
ASP.NET and Web Tools 2015.1 14.1.20907.0
ASP.NET and Web Tools 2015.1
ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/
Azure App Service Tools v2.8.1 14.0.11123.0
Azure App Service Tools v2.8.1
Bundler & Minifier 2.2.307
Adds support for bundling and minifying JavaScript, CSS and HTML files in any project.
Clang with Microsoft CodeGen 14.0.25516
Clang with Microsoft CodeGen
Command Bus, Event Stream and Async Manager Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.
Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
File Icons 2.3
Adds icons for files that are not recognized by Solution Explorer
File Nesting 2.6.67
Automatically nest files based on file name and enables developers to nest and unnest any file manually
GitHub.VisualStudio 2.1.1.5
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
Image Optimizer 3.6.103
Uses industry standard tools to optimize any JPEG, PNG and Gifs - including animated Gifs. Can do both lossy and lossless optimization.
Image Sprites 1.4.47
Boost your website's performance by creating image sprites to reduce the amount of HTTP requests needed.
JavaScript Language Service 2.0
JavaScript Language Service
JavaScript Project System 2.0
JavaScript Project System
KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info
Markdown Editor 1.10.186
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.
Microsoft .NET Core Tools (Preview 2) 14.1.20907.0
Microsoft .NET Core Tools (Preview 2)
Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Mono Debugging for Visual Studio Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Open Command Line 2.1.179
Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.
Package Installer 2.0.99
Makes it easier, faster and more convenient than ever to install Bower, npm, Yarn, JSPM, TSD, Typings and NuGet packages to any project
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Data Tools 14.0.60519.0
Microsoft SQL Server Data Tools
Syncfusion ASP.NET MVC (Mobile) Extension 14.4.0.15
Provides Project Templates to create Syncfusion ASP.NET MVC (Mobile) projects.
Syncfusion Web Conversion and Migration 14.4.0.15
Converts and migrates a web project into a Syncfusion web project.
Syncfusion.VSExtension.Troubleshooter 14.1.0.41
Add-in for Troubleshooting the Syncfusion projects.
Syntax Highlighting Pack 2.3.100
Adds syntax highlighting and snippet support for a wide variety of programming languages such as Clojure, Go, Jade, Lua, Swift, Ruby and many more...
TypeScript 1.8.36.0
TypeScript tools for Visual Studio
Visual C++ for Cross Platform Mobile Development (Android) 14.0.25401.00
Visual C++ for Cross Platform Mobile Development (Android)
Visual C++ for Cross Platform Mobile Development (iOS) 14.0.25401.00
Visual C++ for Cross Platform Mobile Development (iOS)
Visual Studio Tools for Apache Cordova Update 10
Visual Studio Tools for Apache Cordova
Visual Studio Tools for Universal Windows Apps 14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Web Accessibility Checker 1.3.37
The easiest way to perform accessibility checks on any ASP.NET web application. Fully customizable and support all the major international accessibility standards.
Web Compiler 1.11.326
Compiler for LESS, Sass and CoffeeScript files
Web Essentials 2015.3 3.0.235
Adds many useful features to Visual Studio for web developers. Requires Visual Studio 2015
Attachment: WebApplication12_97e7435b.zip
RB
R Brian Lindahl
December 22, 2016 03:58 AM UTC
Also, I've noticed in my main app that it doesn't depend on PageSize being set - the default page size does the same thing.
SS
Seeni Sakthi Kumar Seeni Raj
Syncfusion Team
December 23, 2016 12:11 PM UTC
Hi Brian,
By default, the newly added records in the Grid will be added to the dataSource in certain order. The same order has been retrieved from the server as a result of the Read or POST request. For instance, if a record is saved at some index in the server database which has been retrieved in the same order while requesting for them for the current page. If the current page of the Grid only holds 0 to 11 index and the data saved at the 15th index, then the current page will not populate the newly added records which is the default behavior.
Regards,
Seeni Sakthi Kumar S.
RB
R Brian Lindahl
December 23, 2016 05:27 PM UTC
I understand that... the problem is that, when the records are added to a different page, the current page doesn't go back to the proper number of rows.
* when I click add, the grid shows the new row, and removes one row from the grid to make room for it.
* on update, if the row is on the current page, it shows up and the page is again full.
* if the row isn't on the current page, the page stays 1 row short. However, the grid still thinks that it's full, and further adds will continue to reduce the number of rows shown on the grid.
* when I click add, the grid shows the new row, and removes one row from the grid to make room for it.
* on update, if the row is on the current page, it shows up and the page is again full.
* if the row isn't on the current page, the page stays 1 row short. However, the grid still thinks that it's full, and further adds will continue to reduce the number of rows shown on the grid.
SIGN IN To post a reply.
- 6 Replies
- 3 Participants
-
RB R Brian Lindahl
- Dec 12, 2016 03:21 PM UTC
- Dec 23, 2016 05:27 PM UTC