I have a repeater control, with HeaderTemplate and ItemTemplate both having tables -- The header has 4 column names with a th tag, and the ItemTemplate is being databaound.
The issue is that itemtemplate column do not align properly with the header column names -- Is there a way to align them without explicitly supplying td column widths -- Fixed td widths, I think, may not expand when the containing page expands.
Any ideas?
Thanks.
Actually, I figured out, one table inside the templates did the trick.
Related
I'm not quite sure whether the description for the column I'm working on is proper, so bear with me.
I got an Interactive Grid that I'm adapting, and it's supposed to work such as this:
It should select a name on the first column (an autocomplete field), followed by 3 columns, each with a checkbox. I need to order the data in the grid by the name in the first column. Problem is, I can't use an "order by" in the select statement, so I need to use APEX's "Column sorting".
The column for the name, however, isn't shown in the list to select the order by value. I only get the 3 checkboxes as an option to order it.
I tried having a copy of the name column, but this time, hidden (and not an autocomplete field), but it doesn't work either. Is there a workaround for this?
The IG will only allow you to sort by columns that have been enabled for sorting. By default, only columns of certain data types and maximum lengths are enabled for sorting, but you can override this for each column in your IG definition.
At the moment I have a simple matrix with dates for columns and a single value. It looks like this:
You can see there is no row header for the single value. However, as soon as I add another value, I get row headers for both values.
I do have Show on rows turned on. How can I get the row header to appear when I have just a single value?
As far as I can tell, there is no clean way to do this at the moment.
This Power BI Community post is essentially the same question but doesn't have any solutions other than using a title or text boxes as a workaround.
I have a requirement to build a table widget for sitecore 8 update 5. They should be able to choose the number of columns from 1 to 6 and then edit the content of the table in experience editor.
I know tables can be created using the rich text editor but they really want this widget.
Finally my question is being new to sitecore what would be the recommended approach in building this widget? Keeping in mind they want to be able to choose the number of columns between 1 to 6 and with as many rows as they want and edit in experience editor.
I have done this in the past by using a hierarchy of child items. The data source for your Table rendering may have a field for a header or styles and its children define the rows. Rows have children to define cells. You can use edit frames with insert, delete and move up/down buttons for both rows and cells. If you need to limit columns to 6 or fewer, you may need to implement a custom button rather than use the standard insert button. The cells can then have whatever fields you need or dynamic placeholders.
I've been working on cals tables, and i came across some line as below.
<entry colname="col2" align="left" valign="top"><para>Powers of Attorney</para></entry>
Here i'm unable to understand what entry colname="col2" is for and how to render it in my XSLT. please let me know what is the use of this and also please suggest me some CALS Tables XSLT tutorial.
Thanks
The CALS format for tables includes a colspec which defines the columns and (optionally) gives a name to each column. Individual table cells can then specify which columns they appear in using colname (for a single column) or namest/nameend (spanning multiple columns), which cross-reference to the names in the colspec. In the absence of any colname/namest/nameend attributes the columns will lay out from left to right like the td elements in an HTML table, but with name cross references entries may appear out of order.
Furthermore, row-spanning is handled by a cell on one row having morerows="number", so when processing one row you have to keep track of whether there are any cells spanning into this row from the row above, and if so which columns they are in - it's very much an iterative algorithm which is not particularly easy to handle in a declarative language like XSLT.
Please take a look at this website for more info on CALS tables.
http://www.docbook.org/tdg5/en/html/cals.table.html
So I have a table that shows the index number of the rows. I've maximized the width of the table to be the exact same as the page. Unfortunately the column with the index numbers are now annoying wide so I'm wondering if there's a way I can either set a cap how wide the first column is or make all the columns in the table adjustable? Thanks!
Setting column widths in the Google Visualization API Tables is really annoying. HTML tables set the column widths based on the first row of data in the table, which for the Google Visualization API is the header row (normal table construction would put the header row in <thead> with <th> tags, but Google puts it in <tbody> with <td> tags, which is why it defines the column widths). The API does not provide any method to assign css or classes to the individual cells in the header row, so you have to write javascript to parse your table and set appropriate classes/CSS to handle your column widths. Furthermore, since the table gets deleted from the HTML and redrawn whenever the user clicks column headers to sort the table or clicks the page buttons (if paging is enabled), you have to re-assign classes/CSS to the cells whenever the table is redrawn. To complicate things even more, if you have a height assigned to the table so that the table will scroll when it gets too big, the API actually draws two tables in order to create the fixed header effect.
Normally I'm an advocate of using the Google Visualization API, but in the case of the Table visualization, it is sometimes more trouble than it is worth. You might have an easier time working with another library, or creating your own custom table visualization.
If you want to continue using the Table visualization, here's some code to get you started:
google.visualization.events.addListener(table, 'ready', function () {
var headerCells = document.querySelectorAll('#myTableDiv table tr:first-child td');
for (var i = 0; i < headerCells.length; i++) {
// access the header cell element with headerCells.item(i)
}
});