asp.net placeholders side by side - asp.net

I have a webpage in asp.net that I am trying to lay out and I have a couple of placeholders that get filled with datagridviews full of information from a database.
This is simple enough to do with 2 placeholders and then then tables appear one above the other. What I would like to do is figure out how to do this so that the tables will end up appearing side by side.
I would prefer to keep the placeholder based design of the page so that if the tables from the database end up being different sizes, this doesn't break anything on the webpage.
Thanks for any help that you can provide.

Maybe I'm missing something, but I don't see why you wouldn't just use a 2-column CSS layout, and put one placeholder in the left column, and the other in the right column.
If you're not familiar with CSS, search for 2 column CSS layout in Google.

Related

How to make table cell page brake in Novacode?

I need to make one big table and the cell does not start at a new page,
so one cell will be on 2 pages which I do not want, how can I prevent this?
I found this http://shaunakelly.com/word/styles/page-breaks-in-tables.html
But it does not seem to apply for C#.
I could not find a solution.
It seems that Novacode does not allow page break within cells (I think),
Or at least it is not clear to me how it is done.
My solution was, that instead of having one long table I made many tables,
and using table.keepWithinNext() made my tables page breaking.
Using keepWithinNext() on my cells skewed the document or made errors.

.Net - Best practice for element id's in repeating page sections

I'm not sure how to boil this question down into a sensible single-line title. I'm also new to .Net.
I want to build a web-page version of an invoice, but I want each page of the invoice to flow down the page, not be paginated. The header of each section will be the same, but the line items and the footer will be different.
I've done this before by writing html to a stringbuilder and then outputting it to a literal control, but I think there must be a better way. I'm just having a hard time conceptualizing how to do something like this with server controls because of the fact that the ID's need to be unique.
Can someone point me in the right direction here?
Thanks!
You can create custom control and give it some properties that you can modify how you want and add the same header and footer to the control. Then use it on your page how many times you would like. Check out tutorial here:
http://www.codeproject.com/Articles/87474/ASP-NET-Custom-Control

Custom header in my detail table

I have a grid with a detail table. When I do a multiple sort on that sub grid I would like the UI changed to reflect in which order the sorting is in. I have attached two screen shots representing what I want. I would prefer the header option. The problem is that the user can not tell which sort is the prominent one.
How would I achieve this using telerik grids? I can not find out how to put a header on the GridTableView or inside the detail table.
Any help would be appreciated
Thanks
I switched all my grids to KendoUI Grids and took advantage of the clients commands and manipulated the columns via jquery.

How to layout aspx page that looks like a paper form?

I've been developing desktop aps, so my aspx/html got a bit rusty. What I need to do is layout an aspx page with fields that look something like this (there are many fields, this is just an abstraction):
Basically, the items look like they are in rows, but not in distinctive columns (e.g. in my example, street name doesn't have to allign with street number etc...)
I want to achieve maximum compatibility with browsers - what would be best to use for this scenario? Tables, list items... divs? something else?
I'm using aspx C# 4.0.
Here's a non-table example:
http://jsfiddle.net/eRY8T/7/
The conventional wisdom is that table should be used for displaying data in tabular format, not for laying out forms.
In practice I think it is sometimes easier to use tables for forms - but this is typically when your form looks like tabular data (e.g. one column for labels, another for inputs).
In your situation, I think using divs is actually easier than tables would be. This would probably require lots of rowspan/colspan/nested tables to get right.
The other advantage of using a CSS based layout over tables is that the tab order will probably make more sense. In the example, notice how tab goes through the first column then the 2nd one. In a table it would go through every input on a given row before moving to the next row.
How about Table with 4 Rows and 7 Columns
and use corresponding colspan for better alignment.

Display content in two columns with fixed height in drupal

I'm in need of some pointing in the right direction here...
I have a site with a couple of different content types. I want to display this content in a book-like layout. The book should be of a fixed width and height and the pages should be populated with as many nodes as can fit. It should be in two columns, with the left column being filled before the right one.
How should i approach this?
I have been thinking about a few solutions, don't know which are possible and which one is best or which i can combine.
I could just create a view that selects more nodes than is need. Then check how long the nodes is in the theming layer and throw away the nodes that aren't needed. Pagers need to be fixed too.
Use panels in combination with views to display one view in two columns, if this is possible. Need a way to determine the amount of nodes that is displayed on each page, based on content length.
Write a plugin/handler for views so that i can select an amount of nodes that has an maximum, predetermined, max content length.
Write a new display-style for views that shows content in two columns with fixed heights.
Write a custom module, leave views and panels out of it and do everything myself with db_queries.
Would appreciate and guidance a lot. Not looking for a finished solution, i'm not afraid to code and i will contribute back if i create something that someone else can use (like a views plugin). Just need someone to guide me in the right direction :)
The hardest thing will be to figure out how much content you need to fill out the space. There's not really a good way to do that either since, it will depend on both the markup and the styles.
The best solution I can think of is loading the nodes with javascript, or maybe just have them available as javascript variables. That way you could insert the nodes to your page one by one. You could then in the JS see the heights of all the nodes in total, and once that height is bigger than x, you only need to remove the last inserted node.
It's not a perfect solution, but I think you should look at doing this with JavaScript. The only problem is, that it wont degrade gracefully very well.
Drupal help you build fast, and it looks like promising but fails to fullfil the needs of client, designer also programmer. You need to write one module page, and some functions.
5th solution you gave has little trouble than others. Write a function that to have "teaser like" behavior, I will return formatted node according to its type. Don't lay on drupal's teaser system. If teasers will have different heights, add height to teaser function.
I don't have a direct answer, but have a few things for you to think about.
It sounds to me like what you are looking for is a combination of a CSS3 Multicolumn Layout (see http://www.quirksmode.org/css/multicolumn.html for example) and limiting the displayed content to a fixed height.
My first thought would be to create a single view that gets more than you need, display it using CSS3 columns, and set overflow: hidden; for the container, so that the extra text is just hidden.
If you need to get more particular, you may need to dig in to the views rendering system to limit the total number of nodes based on how many characters have been rendered.
But since your desired constraint is more visual than data-oriented, I think that the most practical approach will be to use javascript to detect the text height and state of overflow.
There are some things that are unclear about your requirements. What is the purpose of the 2 content types? Does one display on the left and the other on the right? Or are these just 2 different content types that should behave the same way, but we're only seeing one content type at a time on a given page? What should happen with the overflowed content? Should it appear dynamically on page 2, then 3, then 4, and so on?
One parting thought: Maybe load ALL the content that you want to page through, directly to the browser. Maybe have it start off hidden. Then use javascript to display it, formatted into columns, and use javascript to handle the paging as well.

Resources