How can I get the visible date interval in AnyGantt? I need to add two buttons to move back and forth the gantt, but I can't find how to do it. I was thinking on reading current start and end dates and then zooming the gantt to the new values...
Thanks.
I'm glad to inform you that new version of AnyGantt 8.1.0 provides new methods to get max and min of visible range.
You may learn more about them and find example on the following page
Mendi,
In this case zooming the gantt to the new values is one of available ways to do it.
Check this example which demonstrates using html buttons and zoomTo() method to scroll timeline :
https://jsfiddle.net/Shestac92/9zzhw472/3/
chart.zoomTo(start, end);
Also you may use out-of-the-box method to add similar buttons to horizontal scroll bar, check example in Anychart Playground:
https://playground.anychart.com/api/7.14.3/core/ui/anychart.core.ui.ScrollBar.buttonsVisible-plain
scrollBar.buttonsVisible(true);
Hope this will help you!
Related
I would like to create an Excel document with all the date from 01-01-2018 to 31-12-2018 with each day in a separate columns but only display a certain amount of days (not the entire year) with the possibility to scroll left or right to see the rest. What can I do to achieve this ?
I've tried to to freeze the panes but it's not what I want.
What I have :
What I would like (with a scroll bar) :
You can only freeze one side of the table, and even if you use the Split button to try to hold the other side still, it turns off the freeze, so you can't do both at once (which would have solved it).
https://support.office.com/en-us/article/split-panes-to-lock-rows-or-columns-in-separate-worksheet-areas-516a7001-b3ed-4122-a6bb-fd6d4a9d6434
If you turn the spreadsheet sideways, so the dates go down the page instead of across, you may be able to do something with the Group button:
Sorry but I don't think there is a way to solve it properly, maybe you can move the static columns from the right over to the left too?
The documentation in react-virtualized is not clear on how row selection is handled. I need to:
track selected row
highlight selected row
query which row is selected (I care for getting to its data)
It appears that there is a way to handle row click events and change style class on per row basis. I assume I have to roll my own selection tracking based on these parameters. I hope I am wrong and there is a better way.
Than you
The concept of a selected row or per-row styling is not specific to windowing. It's part of application code and should be tracked there- using React's built-in setState probably.
react-virtualized doesn't have anything built-in for this because it's orthogonal to the purpose of the library and I wouldn't want to add bloat (in terms of byte size or maintenance efforts) for features that aren't core to windowing.
I've created examples of doing similar types of things online that you might find useful to look at. For example this slide (source code here) shows click-to-select styling.
I have used React-Virtualized Table in my app, and there are library provided functions for row style and row data.
version: react-virtualized: ^9.19.1,
Link: https://github.com/bvaughn/react-virtualized/blob/master/docs/Table.md
checkout function onRowClick for picking rowdata,
and getRowStyle for giving styling to row.
The textarea-class in JavaFX should give me the option to add rows and columns, but the way I tried didn't work:
TextArea ta = new TextArea();
ta.setPrefRowCount(100);
ta.setPrefColumnCount(100);
I'm searching for columns/rows like in Microsoft Excel, inclusive the gridines.
.setGridLinesVisible(true);
doesn't work for this Type.
For use case similiar to Excel you're actually looking for TableView. Every table cell can contain anything, even another window so it is very flexible.
If you want grid lines on top of TextArea, but want to keep the standard TextArea behavior, you will have to combine the TextArea and TableView in a StackPane.
You will just have to clear the table's background using CSS.
However, matching the row and column sizes with the text will need some additional code.
Apologies for my English.
colums/rows like in Microsoft Excel, inclusive the gridines
TableView as recommended in Michael's answer is likely the right basic solution for.
There are some 3rd party controls you might consider which add some basic spreadsheet like functionality to the base JavaFX TableView control:
SpreadsheetView from the ControlsFX project.
TiwulFX from Panemu.
I have two connected DataFormWebparts on a site page, with one web part filtering the data in the other, and this works fine as long as the design style allows the options to be clicked on i.e. the information is laid out in text format.
However If I change the style to be a drop down list then the filtering no longer works. I'm assuming this is because there is no longer a hyperlink to trigger off the event, but is there a way to make it work in this format?
jquery to the rescue. hide the links. show the dropdown and with jquery or javascript, trigger the link click on dropdown index change. try to google out. hope these hints help
faced same issue. i did this as i had less time
I have a Grid and I want to add a button to each row of the grid and have it reset required data.
Assuming that you are using GXT3, here is a link to the Cell Grid example from GXT3.
http://www.sencha.com/examples/#ExamplePlace:cellgrid
If you look at the bottom of the page, there are two tabs; one for "Demo" and one for "Source". This demo clearly shows how to add buttons to grids. Take a look at how they are using TextButtonCell in the asWidget() method.
These examples are a pretty good starting place for figuring out your answers. The next best thing (if you want to figure it out yourself) is to simple navigate the source code.
Hope this helps.