Using Pager to rotate through Page Fragments - google-app-maker

I'm using Google Appmaker to produce an internal dashboard. The dash requires that a series of page fragments (designed as 'cards') be cycled through using a pager.
I'm a little unsure on how to do this - my thinking is that I'd need to set up a data source for the pager as an array of the page fragments I want to display, but I could be thinking about that all wrong.
I need to be able to reliably use page fragments as reusable UI elements and display them on the page in a way that can be 'thumbed' through using the pager controls.
Would I need to do this in a single fragment? Looking for guidance here.

Related

Implementing Forms/Button

New to access and I am trying to build a database to organize some in-house parts. I currently have a table containing measurements, photos, etc and having it displayed through a form. The form would show these values and the image of said part. Id like to add two buttons to the form that will
pull up a pdf of the drawing file and
List item processing specs.
So far I have tried creating hyperlinks or embedding the files into the form, but if you were to search for another part, it would direct me to the same two files no matter what part is displayed
I wanted to know if was possible to make it so if you change the search for the data displayed and how to go about implementing it if it is.
I don't know the full circumstances of course, but typically you would add a TextBox control to the form that is bound to the hyperlink field in the table.
If you wish to use a Button instead then I would probably use the Current event of the form (triggered as the user moves between records) to change the hyperlink properties of the button to those of the (bound) hyperlink field. These properties are:
Hyperlink Address, Hyperlink SubAddress and Hyperlink Target
(and the button's Caption)
It might require code on other events as well, to cover different eventualities.

ASP.NET: Creating multiple printable pages and print them with one click

I want to achieve the following: create a number of instances of the same web page, each of the the pages displaying slighty different data (like customer name, address, ...). These pages should be printable with as less effort for the user as possible. The problem is that if you call the javascript print-directive on every page, the user would get a ton of the PrintDialogs.
One solution to solve this problem would be to create those print pages dynamically during runtime and put them all on one page, separated by page breaks (so the user would only have to confirm the print dialog once). This solution has the huge problem that I can't use the Visual Studio designer to put my page together.
Another possible solution would be to build the template of the page in the designer, dynamically fill in the customer-specific data into the corresponding controls for every page, and then somehow chain all the resulting pages together to one long page; again separated by page breaks. But I dont really know how to do that....I tried to use the Render() event, get the HTMl code and then duplicate it, but I didnt have much success with it.
So, any guidance for the Render() approach or any other solutions would be very welcome!
Is your data in any form of list? Can it be put into one? Not necessarily all of it, but an ID per desired page, or something similar? Sufficiently that it could drive a data-bound control?
You could use a Repeater control on your page to build out your "pages" according to a template. Page breaks could be achieved with CSS styles. Then you'd have just one (long) page you had to print.
You could even make your "page" a UserControl to make data-driven variations in rendering easier to organize.

Room drawing controls

i need to add some functionality to an asp.net application that allows the positioning of tables, and other objects like doors and pillars in a room. The tables can be of a few pre defined shapes, and need some text information inside them, like table name or something. The user should be able to drag these shapes into position. The position etc of these shapes then needs to be persisted in a DB. the actual size and shape of the room also needs to be 'drawn' by the user, and again stored in a DB.
Before i embark on some WPF/silverlight project or something, does anyone know of any controls, either asp.net, or silverlight, or even jquery etc that will allow me to do this ?
Edit - The app is asp.net web forms with partial page rendering using ajax.
I would use a combination of HTML tools:
jQuery UI draggable lets you do the dragging around bit quite easily.
You can include input text boxes in the draggable elements to hold names of objects and style them appropriately.
By hooking on to drag events, and copying the coordinates into hidden input tags, you can create an HTML form that, when submitted, should contain everything you need to save the room to the DB.

Implementing a text slider or "slideshow" with AJAX or JQuery

I am trying to find a nice way to implement a text slider (examples: News feed or testimonials) with the AJAX control toolkit and/or JQuery that does the following:
"Slide" (or fade) every few seconds to the next block of text
The text blocks cannot be static, as there can be hundreds/thousands of them. Most likely will need to call a .NET web service to return a random block of text.
This will reside within a .NET User Control and will be included on many different pages
We have done JQuery sliders (both images and text) over and over again, but only within a specific set of HTML blocks that are output to the page. This time around, we need to dynamically pull (using javascript/jquery) a random text feed from a web service instead of generating all 1000 of the div or list blocks for each "feed" since it would run VERY slow.
We found a solution:
We simply created the user control as an AJAX-enabled UC (added the Update panel). I then added an asp:Timer to the page. Every page_load (or Tick event if we wanted), we pull a random text block from the database. No fade or slide effects, but I'm content with the result.

Tab Navigation - Frames or AJAX?

I have what I imagine to be a pretty standard web-interface.
There are 4 different ListViews (grid controls) which are accessed by a series of Tabs on the top.
I have implemented this as follows:
alt text http://img402.imageshack.us/img402/1530/pagedu8.jpg
Tab 1 will load Page 1 containing Grid 1 into Frame 2, Tab 2 will load Page 2 containing Grid 2 into Frame 2 etc.
However this then means that if you click on an item in the Grid, and I load DetailsPage1.aspx into Frame 2, then Frame 1 and the tabs are still visible and active.
I've been advised that I should just have one Frame, and load the Pages in dynamically based on the tab click, using HttpRequest (or WebRequest in asp.net).
Is this the correct approach to take? If you have any resources or tips at hand, it would be appreciated!
Thanks
Frames are an absolute no-no. There is no benefit to frames that can't be achieved using other techniques.
Does that mean you must use AJAX? Not necessarily. AJAX is a perfectly good solution if you feel the need to provide a rich, seamless interface, but it's not strictly necessary.
You could use server-side includes to separate your tabs into a another (common) sub-page, but since you mention ASP.NET, (assuming you are running on framework v2 or greater) you might want to use Master Pages, where your tabs are in one content section or in the Master itself, and your grids/details are in another content section.
The key difference between the two techniques is that using AJAX, the transition from tab to tab will be slick and seamless, but a) it takes a little extra work (particularly if you are unfamiliar with any give AJAX framework) and b) since you essentially have 4 pages rolled into one, the pages are 'heavier' and are more complex to maintain. If you opt for the non-AJAX route, the key difference is that there will be a small but distinct refresh effect when you click on each tab (since it loads a new page each time).
Of course, Master Pages are useful for maintaining a consistent site style and structure anyway, so there is no reason why you can't use AJAX with a Master Page system.
Frames are lame: you will get problems, if users want to set a bookmark and if users visit your site via google: Then your navigational frame is not visible. So you need a lot of dirty javascript. to check this. If you need javascript, do it right from the start and use AJAX
Ajax is the best pick. But keep in mind to make it browse-able via back/forward. The best pick is to change page hash. I used something like this:
domain.com/#tab1 for first tab
domain.com/#tab2 for second tab
and so on.
If you use jQuery, this can be a good start (i use that and i had NO problem with). I'm sure there is a solution for all popular framework though :)
Instead of using frames, you should just include your navigation page in all of your other pages. The browser will see that you're including the same document in all of your pages and cache it.
Have you tried the TabContainer or loading all 4 detail panes and just showing/hiding panels on tab selection change?
Depending on what screens your users will see, if you load the detail views dynamically (Ajax or postback) you may have trouble persisting any information that the user has entered, and you will incur a wait (users dont like to wait)
I would recommend using jQuery and jQuery UI plugin. No frames will be needed, just div containers.
Like StingyJack, I would suggest having a look at the TabContainer control, but you might want to take care that your ViewState doesn't get too large if you do.
So for example, don't load anything into a GridView until that Tab is being viewed and remove it contents if it is not (saving back to the database of course if required. Using the TabContainer's ActiveTabChanged event would be key to this strategy.You diable ViewState for the grids but leave it on for the container.
You're using ASP.NET, so just load all 4 controls into a mutliview and then on postback set the visible one to be which ever button has been clicked.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.multiview.aspx
DO NOT uses frames (or iframes for that matter) unless you absolutely must...
The only valid reasons I can think of to use (i)frames is file upload controls in fact, and I am not sure it's valid there either...

Resources