Load bulk data in HTML table faster - asp.net

I generate an html table from code behind to display data like a grid (Note: I am not using GridView). I then assign that HTML table to a div. But now when data is large (around 2000 rows), it displays a white page like the application has hung.
How do I resolve this issue? I am thinking of showing only 100 rows at a time while other rows are generated in background but I don’t have any idea of how to implement it.
Can anyone help me? You see the type of functionality that I require in Facebook when you scroll down. Please let me know your ideas.
Thanks.

What you are looking for is called "infinite scrolling." Here's the links to a jQuery plugin that should help you get it going:
http://www.infinite-scroll.com/infinite-scroll-jquery-plugin/
https://github.com/paulirish/infinite-scroll
Like a lot of other solutions, the specific code will vary depending on your containing HTML and your data source. Post back here if/when you have any specific problems you need a hand with.

Related

RDLC Local Reports KeepTogether does not work

I’m having problems with an rdlc local report. When exporting to Excel, I want to keep a table on one page, and if it doesn’t have enough space to entirely move it to the next page.
I have tried the KeepTogether property, but it doesn’t work. I have also tried other suggestions like putting the table inside a list or a rectangle, nothing helps.
Forcing page breaks dynamically is not easy, and in this case the Excel report contains 2 sheets, which is not what we want.
Does anyone have any idea how to solve this? It is a Windows Form project.

Inserting text below image on download

I have a collection of images that a client can download should they desire. However, the boss came to me with a requirement to try and add text at the bottom of image. Unfortunately due to space constraints on the server, I can't simply use Javascript to add the information to the bottom of the page when it is uploaded.
Ideally the format should two rows with two cells each. Any help on this would be appreciated.
I believe this is what you are looking for.
http://mvark.blogspot.com/2004/12/code-programmatically-add-text-to.html

Different header in MigraDoc

I have been looking around and I cant find a way to do this as I want.
I have MigraDoc creating a PDF that can be one page or more, the header on the first page I would like to be different to every other page. E.g. First page has a logo and all others do NOT. So I need more then one header. This is something that I have found to do using
Section.PageSetup.DifferentFirstPageHeaderFooter = True
The problem that I have is that this also means that the footer (that will not change at all) does not show up on the first page. For the Footer I am using a table Section.Footers.Primary.AddTable.
I could use a "quick fix" by just copying the table (footer) and pasting it with it changed to section.Footers.FirstPage.AddTable but then I would have a ton of code that is just messy and not needed as the footer does not change, is there a way around this?
Any help would be great. I will continue to look around to see if i can find anything more on this.
You could also use
section.Footers.FirstPage = Section.Footers.Primary.Clone()
after calling AddTable().
Maybe it would be enough to just all section.Footers.FirstPage.AddTable - IIRC the first page footer will be used for all pages if you do not assign a special primary footer (but I could be wrong about this; I'll check this Wednesday or Thursday).
Well, as no one else can answer this the best way I found to "solve" this problem is to create a function that creates the table. Then I call the function and use it as Section.Footers.Primary and section.Footers.FirstPage
If anyone does have a better way please do feel free to give a comment or something.

Drupal Views overflow

I have a Drupal 7 / Views question...
I have a site with some data reports displaying in various graphs/ gauges etc. I also have a "Data" page that shows all of the data used so the user can look through it and/or even download it. My problem stems from the views table overflows past the screen on the right with data. This in itself is not a big issue, but I was wondering if there was a way to contain the view inside a fixed size box/container that is scrollable. Much like a text box.
Again, not that it would help the functionality but sure would make it look nice and clean.
Thank you in advance.

How to use jQuery to show a different page in ASP.NET

I am trying to set up functionality similar to Netflix. Where if you mouseover a movie - you are presented with a window of movie details (all client-side).
At high level, can someone in this forum help by telling me how this should be implemented? I.E., one or more .aspx pages, what would go in code-behind, and .js file, css, etc. Just trying to get an idea on how this would be set up to work.
Basically, when I hover over an item, I need to query for details that belongs for that record being moused-over and display it in the window or div. I also need to have some functionality in that window (i.e. a textbox and button which will end up needing to get saved in a database).
Thanks for any tips and suggestions -
You would want to add an AJAX call to the hover event of the image, that pulls from a webservice/web method.
Here is a good example, you would change some things. However, it should get you started.
http://www.mikesdotnetting.com/Article/96/Handling-JSON-Arrays-returned-from-ASP.NET-Web-Services-with-jQuery
If I understood your question correctly, you should try this excelent jQuery plugin:
http://www.sohtanaka.com/web-design/css-on-hover-image-captions/
Look at the demo here:
http://www.sohtanaka.com/web-design/examples/image-hover/
easy to install and configure and very slick!
Good luck
EDIT: sorry wrong lik the first time
There are certainly many jQuery plugins that will do this for you. jQuery UI may also be of benefit.
Here is one that appears to do something like you are describing:
http://plugins.jquery.com/project/VisualLightbox

Resources