I know such questions are in tonns on SO, but my question is little bit different. Generally , i found in SO, Custom Paging using Linq2Sql/ Sql. No I am not asking the same, i am done with that, my issue is with the pages(data pager) displayed on my asp.net page.
In my table i have around 640 rows which will grow in future to thousands and even 10 thousands and more.
what i did:
For implementing the custom paging, i followed Mikes this article and successfully implemented the custom paging on my records. I have a repeater on page and i am bind the data using Take and Skip as directed by Mike.
After implementing the paging, i found that its creating 10 records per page so in that case I got 64 pages displayed in my pager, which seems awkward. Its something like this
1 2 3 4 5 6 7 8 9 10 upto 64, killing my page css and ui. Also it is not good , as user point of view. So
What I want is that:
I need SO User section like Pager... see here
Finally I got solutions
Thanks all of you, I got what i needed exactly. I am posting it as an answer below, so that it will help to others requiring the same.
I answered my own question, as this will help others who are looking for the same,,,,
http://www.codeproject.com/Articles/11418/Pager-Control-for-ASP-NET : This is a custom control that I got on CodeProject. Very useful for those who needs Custom paging in ASP.Net, lightweight and easy to implement.
Related
During recent weeks I have posted a number of questions regarding Telrik Reporting which of course come back with no response.. But fortunately, I managed all the matters. Now I ma going to raise another question and hope this one had some response.
The Question: There is a report which displays about 455 records. I am using MVC 3, WebApi and Telrik Reporting of course. I want to implement some kind of lazy loading. I explicitly mean, display records 30 by 30 on each page of telerik report viewer. That is to say, at first step only 30 records be loaded and if the user navigates to the next page, then another 30 records show up.
Can anyone give me a tip or solution how to handle this? Does telerik support something for that?
Thanks you
Actually, Telerik Report handle On demand Loading on every page for the client side of course. But at first it fetches all the data form the related data store. This is what I have got after days of researches and lots of efforts on this issue. Thus, decided to share it with others as no one comes to this questions with an answer! Hope it be helpful
I am looking for some help to get started on creating an editable GridView in ASP, I already have everything working in a Form Application. Now my plan is to convert it to a Web application using ASP.NET. Not too hard I'd say, but I just have some trouble with my GridViews. So here is what my current application does and what I want it to do in ASP:
I created multiple GridViews, with only a single column. Then on this column, rows will be added when the application is started, how many should be added is found in the database. Some of these rows will be filled with data from the database, some will be left empty. I already have the code for this, just need to convert it to work with ASP. I want the user to be able to edit all these rows, including the ones that are empty. These columns do nothing fancy, the user is only able to put numbers in them.
Since I'm completely new to ASP, I have no idea how to create a GridView that has empty editable rows with it. Maybe it's very simple, but a nod in the right direction would be very much appreciated! If anymore info is needed, please let me know
What i want to do in ASP.NET
GridView is one of the the most powerful control in the long line of controls since .NET released under WebForms, it is so vastly used that there are thousands of examples and tutorials to do almost everything.
Since my times learning the good things about the GridView, I always rely on 2 websites, and today I will make them my answer.
One, I can no longer found, was something like The GridView Guy, a lovely website with the best tutorials to raise the .NET control to do almost everything.
The Seconds is the famous Matt Berseth and all his tutorials surrounding not only the GridView but other controls as well.
http://mattberseth.com/blog/gridview/
There are plenty more tutorials out there for this, like:
http://www.codeproject.com/Articles/16769/Full-featured-Editable-GridView-Control
http://www.dotnetspark.com/kb/643-how-to-editupdatedelete-gridview.aspx
http://aspnet-with-c-sharp.blogspot.dk/2011/02/fully-editable-gridview-in-aspnet-2.html
You just have to follow up and if you find a wall that you can't climb, assure that someone around here can help you out, just show us what you need to do, and what have you tried.
I need to create an option at work to use mega menus, basically the designer should be able to set the level per columns for the mega menus so if there are 10 items under one category and the designer sets the level to 2 then the megamenu for that category should split into two columns of 5 items. What would be the best way to implement this using Asp.net C# and JQuery so it looks nice?.
Also, how can i do it so that if there are 10 items I can break it into columns of 5?
Relevant information:
- The data for the menu is comming from a table.
- The menu will be horizontal
I am not asking for the code but for the best approach and also the best way to go about this.
Thank you!
jQuery can certainly handle all the interactions.
If you're asking the best way to split out the links, I think the answer is do it whichever way is easier for your team. The client-side processing to split the list won't be that much, though it's nice to do it client side if you can.
I'm using the DevEx DXGrid (WPF) to show about 2,000 rows of data. I'm using a DataRow Template to get Master-Detail behavior (a new detail grid for each row).
My application responds extremely slow to almost all use input (to the grid). for example:
scrolling
expand/collapse group rows
resize app window
I've contacted DevEx support about this - but they say the solution is non trivial and they are waiting until next major version to 'fix' this.
Have you found any solutions to these problems? I'm hoping there is a way to structure xaml or code to avoid some of the performance problems. I'd be very interested to hear what performance problems you've encountered with the DXGrid and how you solved (or not) them.
thanks.
Indeed, we have changed the way the DXGrid works and it should operate faster. However, this improvement will be only visible in 10.2 and it relates the expanding / collapsing group rows.
If you have problems with scrolling, please post a sample project in the support center showing your performance issues. We will try to improve the control based on your particular situation.
As a general rule of thumb, simply put: the less controls, the faster it will be.
When using the GridControl, you may want to look into using the CellDisplayTemplate and use a very lightweight control to display the content of the cell, and then use the CellEditTemplate for your heavier edit control, as the CellEditTemplate is not is not loaded until the user enters the cell. This becomes very powerful the bigger your GridControl is.
See 3 or 4 for more info on GridControl optimization.
I have a C# win form where I read a file and show lines in a datagridview. Everything works fine.. and I use delegate and Invoke for displaying the lines as they are being read. It also shows a progressbar and does some other stuff like calculating line length and parse the lines to extract certain fields from each line.
Just curious, if anybody has tried this kind of implementation. Currently my app reads a 250MB file (having ~ 12000 lines) in little over 3 minutes (Win 7 32bit/celeron 2.66Ghz/4GB). I was wondering if it is possible to reduce the time - more of like by changing the way I implemented it.
Well, you're quite right to have second thoughts about this. What's probably the toughest read possible, War and Peace by Tolstoy, has roughly half a million words. What you're dumping to the screen is a hundred times more. It doesn't really matter how long it takes to put this much info on the screen, it will take your user a wholeheckofalot longer to even scroll through it.
I personally hesitate to ever put anything more than, oh, 50 items in a list. 100 tops. Beyond that, it becomes sheer torture for a human being.
To get there, allow your user to filter content, gradually drilling down in the huge result set to a relevant item. Exactly what that ought to look like is not clear from your question. Think about it for a bit, I'm sure you'll come up with something.
Ok...I love these questions. Why are you showing a user 250mbs of data in a data grid? There is NO WAY that an end user can process understand 250mbs of data in a grid. If the end user is pressuring you for this feature you need to address it with them from a "this is a bad idea" standpoint. Performance problems can usually be solved in most cases by educating the user. :-D
First, you need not load the entire file, nor display it. You can load portions of it for display. i.e. in the grid, you cannot show the enire file anyway, the screen is only so big. Consider loading only what you display (plus a few extra lines for smooth scrolling) and load the rest on demand as the user is scrolling through the content. The user will be unaware that the file is only partially loaded.
Even nicer would be if you have some logical grouping, in a book you could display the chapters, in a financial type application, either by account or time period.
Maybe something like VirtualMode can helps you:
Virtual mode is designed for use with very large stores of data. When the VirtualMode property is true, you create a DataGridView with a set number of rows and columns and then handle the CellValueNeeded event to populate the cells. Virtual mode requires implementation of an underlying data cache to handle the population, editing, and deletion of DataGridView cells based on actions of the user. For more information about implementing virtual mode, see How to: Implement Virtual Mode in the Windows Forms DataGridView Control.
P.S. About performance: no one except profiling tool can't helps you to solve any performance-related problems.