For a small in-house project I need to display tabular data grouped by a certain column. It would be nice to be able to expand/collapse the groups. The Group title is a simple text string.
Is there an easy way to accomplish this with standard controls, preferably using data-binding instead of manually populating for example a ListView control?
You may be able to achieve what you need using SubDatasheets in Access.
Another way to display information, if you don't have too many columns, is to use a tree view.
There is even a 100% VBA one!
Related
Lets say I want to make a website in which only one HTML template is used. For example, if one wants to create a new object, he clicks a button, and form shows up, leaving the remaining web page intact. My question is simples: should I use only 1 view to handle all the possible inputs/outcomes or should I have multiple views that handle the same template?
Thanks in advance
You can do one view, but if it starts to get complex, accounting for each possible input and output can become a headache. I suggest you use as many views as you need and then later implement AJAX to present everything as if it's only one-page
Seems like if that is the only thing that you want to do, having one FormView and handling the cases accordingly should suffice. For a given form, if it's not necessary, keeping it to one view is generally a good choice.
I am generating HTML tables based on SQL statements for a Datawarehouse created through meta table information.
One of the issues I have is some of returned Datatables have 100 plus columns. Is there a neat way of displaying this in an HTML table or a specific design solution. Please note I am looking at the display here. Changing the amount of columns available is not an option. All columns need to be rendered.
Many thanks in advance for input.
I can think of 2 good solutions:
Wrap the whole table with a fixed-width container, and set overflow-x: auto on it. That will cause the table to scroll.
Allow the user to filter out whichever columns he doesn't need to see using JavaScript/jQuery.
Both are possible, the first is obviously easier to implement, but with the second you have more control. Choose your path and if you're stuck, you can ask here on StackOverflow for help.
What you are describing is called datagrid. You definitely should not generate the HTML yourself(as you sad) and instead just bind the result set to any kind of server-side data-grid or use some kind of client-side jQuery datagrid implementation.
https://stackoverflow.com/questions/159025/jquery-grid-recommendations
I have a jQuery Mobile web page with an Inset List that is wrapped in a HTML form. When the action is Submit, the POST parameters are validated in a corresponding file. An SQL query uses these parameters to extract data as per user's actions.
I was wondering, how I can display this query data in a tabular format which has about 8 columns.
Note: This application is actually used on desktop PCs only.
Any suggestions are welcome.
Without knowing the target devices, orientations, or size and type of data your are trying to display I would say that you can still use HTML table tags. If you want some jQuery Mobile type styling, this other post may help.
The response on this forum post explains some great reasons why you may want to reconsider displaying the data in a columnar fashion.
Is is possible to reconsider how much data to display or using something like collapsible sets? Otherwise you probably just want to stick it in the 8 column table and expect the user to scroll horizontally and vertically.
I'm extremely new to Grails and Groovy and even web development in general, so if this question seems too asinine, please bear with me, I've always been focused up-to-now on desktop development.
I'm attempting to create a web application that allows users to move objects around (drag-and-drop) on their screen from one column to another. Imagine something that allows users to organize things into various groups and each group has it's own column. Also, the users should be able to create or delete any groups they'd like. (The creating/deleting groups part I've gotten taken care of in the Groovy code).
My question is, how, in the view/HTML code, do I get the site to be dynamic in terms of creating the grid? I need one column for each group, but the dataset of groups that exist will not be static, so in theory I will never know how many columns I actually need. I'll also need to do the same thing for the rows, but I expect that doing it for the rows would be more or less the same as doing it for the column.
Thanks for any help you can provide. Cheers!
UPDATE:
I'm seeing Groovy used in the view to iterate over a list of items and create a dynamic bulleted list like this
<g:each in="${ group }" var = "group">
<li> ${ group.name } </li>
Should I just try something like that to dynamically create a <table> object? That seems like it'd work, but might not be the best way to go about it.
Take a look at JavaScript, jQuery and more specifically, jQuery UI Draggable and Droppable.
For full control of your application, do you prefer a GridView or a HTML table?
And why?
For instance, I need to create on-the-fly hyperlinks-per-row in a GridView/HTML table. What object would be more easy to add that feature (or others like this one)?
Note: I'm creating programmatically my datasets
If you don't need the built in support for sorting or paging, and want more control over the rendered output then I would consider using a Repeater control to output a table. If you need the built in sorting/paging then the GridView can be very helpful.
If you want the best of both worlds, upgrade to ASP.net 3.5 and use the ListView.
EDIT: Can you clarify what you mean by 'on-the-fly hyperlinks-per-row'?
Stay away from the Gridview. It has to pull down the entire dataset to render the paging. It's much faster to render only the rows you need (e.g. rows 30 - 40 of 6,0000) and use a seperate pager control.
Also when it comes to HTML/CSS, using a repeater or listview will be much easier to debug, since you'll have total control over the code.
A plain HTML <table> generated by Response.Write is straightforward and has the added benefit that if you ever work on a non-Microsoft system, you won't feel naked without their redundant ASP.NET web controls that mostly just make it more difficult to generate the HTML everyone already knows.
I think the Repeater or the newer ListView is the way to go if you don't need sorting and/or paging. The Repeater and ListView allow you to control the HTML (the GridView is a total black box in this regard and generates atrocious HTML) while avoiding the tedious server-side code that comes with the <asp:Table> control: "OK, new row. New cell. Do something with cell. Add cell to row. Add row to table. Repeat".
On the other hand, if you need paging and sorting, the GridView is probably the better solution.
You can use GridView or more simple Repeater-like controls to build your own html, even if you have to sort/page you data.
With a Repeater for example you can build a custom system of pagination using a PagedDataSource data source with the property AllowPaging sets to true.
The only problem is clearly that with a simple Repeater you must write more code to do the work that GridView does natively.
But the result is faster.