Getting a grid count google apps - google-apps-script

I'm trying to create a dynamic grid but I see no way to get an actual count from a grid class.
Has anyone found a solution to this?

You could store the value in a hidden text box and use createFlexTable() itself is a dynamic style grid.

Related

Is it possible to have 2 tasks on the same date in angular-gantt?

I'm trying to make in a webapp a gantt-chart to display some data in a nicer way, using angular-gantt.
Some tasks are overlapping in certain rows, but the bars are displayed.
Is it possible to have the two thinner bars in the same row one under the other (not overlapping) ? or should i better create a separate row ?
ps. i'm not exactly a developer so maybe the explanation / question is not clear enough
Yes, it's possible.
You can do it by setting the property daily = 'false' in the place where you define your gantt chart (<div gantt data=...>).
div ng-app="appGanttChart" ng-controller="controllerGanttChart">
<div gantt data="data"
daily="false">
<gantt-tree enabled="true"></gantt-tree>
<gantt-groups enabled="true"
<gantt-tooltips enabled="true"></gantt-tooltips>
<gantt-resize-sensor></gantt-resize-sensor>
</div>
/div>
You don't need to set all the properties I have set, I was just giving an example.
Setting up daily="false" should solve your problem.

Modify single column alignment in nattable

I am kind of a Newbie in nattable, I want change the alignment of first header column in nattable to the left and the rest remain on the right, I know that alignment is generally defined like this:
this.cHeaderHAlign = HorizontalAlignmentEnum.RIGHT;
Is it possible and How can I do it?
From your code snippet it looks like you are referring to theme configurations. But without going into details how this can be done using themes you need to understand how the basics are working.
In general you need to add a custom label to the first column in the column header and then apply a style object with the needed alignment for that label.
Have a look at the NatTable - Getting Started Tutorial to get an idea how this can be achieved.

How should I handle "no-gap" and not "extra-width" in Twitter Bootstrap grid

First of all take a look to this picture:
I'm trying to build this using Twitter Bootstrap (3.2.0) but doesn't know how to. So after read TB docs and Google some resources I came with this possible solutions:
Not use row and cols-x class from TB which may cause issues later for responsiveness and so on
Use them and overwrite the behavior by removing any padding or margin causing the gap between the two div
In this case which one should I use? What yours use on this cases?
As second question and related to the same:
How do yours calculate the right cols-x to apply in order to get as close as image width is? Any formula? Right now I'm doing using Firebug and applying cols on the fly but this is insane, any advice?
If you want to make two columns without gaps between each use own custom columns

UiApp Merge 2 Cells in a Grid

In Google Apps Script UiApp, is there any way to merge 2 adjacent cells in a Grid?
Quick link to Grid doc
Looking through it, I see nothing about merge capability. Take the following example:
What I want to do is merge the cells # [0,5] and # [1,5] So that the TextArea for Description is a bit better-centered.
Is there any possible way to do this at the current time? I don't want to have to revert to using Flex Table for this... is that my only option? Are there any other workarounds like embedding the encircled elements in another panel or something similar?
Solution: CSS margin properties on the Grid or Widgets (through setStyleAttributes()). Apparently this is the behavior of Widgets in a Grid: CSS styles almost bypass Grid constraints; i.e., if you set a bizarre bottomMargin on a Widget, it can almost move out of the Grid, which acts as a "centering" between two cells. So I just did the following:
textArea.setStyleAttribute("marginBottom", "-75px"); which gave the following result:
I'd try using 2 grids, one with the textArea (and the 5 widgets of the first row) and the other with the other elements...
This latter should have a negative top margin to allow you to get the right vertical distribution on the 5 first left widgets.
I didn't try the negative margin but it should work.
Let me know if you try it :-)

how to make a form designer

The Problem in Hand:
I want to make a form designer where user can drag and drop fields of different type and design the layout too, some what similar to wufoo form builder but here the layout is limited to single column whereas I want to make something where user can make the layout as they want.
I understand how to do in single column view, but could not understand how to achieve multiple column layout eg: row 1 there could be 3 elements, row 2 one element stretched to full length, row 3 there could be just 2 elements etc.
What I tried:
I have tried with jquery UI sortable to make a single column layout with using div where new elements can be dragged and repositioned.
Any suggestion on how to proceed further will be helpful
I have tried searching StackOverFlow and google but could not find any link on a similar topic. If anyone could point me to the same, it will be also helpful.
When you reorder elements on wufoo form builder, you can only drag'n'drop up or down. Remove that restriction and as soon as one element is dragged across a certain threshold, it "belongs" to the next column. If the "old" column was the first or last one and the line that the element was moved over was to the "outside" of the form, add a new column there, until the maximal number of columns is reached.
If the used drags the last element of a column into another column, remove the now empty column on element-drop.
You could also remove the dynamic adding/removing of columns and juist have a button ("remove column" & "add column") to do it by code.
An example for the dropping in another column can be found here: http://jqueryui.com/sortable/#connect-lists
Hope this helped!
Edit:
http://jqueryui.com/sortable/#portlets and http://jqueryui.com/sortable/#empty-lists also have elements that you could look into. Good luck! Sounds like a nice project. Can we see any progress or beta?