How to save column order and the width of the re-sized columns after changing the size of columns in NAT table into the prefernce - eclipse

How to save Column order and width after changing their position and size ?
re-sized column width should be persisted and used in the subsequent sessions (and also considered during export/import preferences usecase)
any change in the column position should be persisted and used in the
subsequent sessions (and also considered during export/import
preferences usecase)
Q1. How can I get the column width of the nattable after changing the width by dragging/double click event ?
- I want this with original column position even after the column is not in the original order.
Q2. How can I get the column order, after re-order using drag and drop?

Answer to Q1:
Ask the layers, they have getWidth() and getColumnWidthByPosition(int) methods
Answer to Q2:
Typically you will need to check the ColumnReorderLayer directly.
But if you want to store and load NatTable states, you should have a look at the persistence mechanism provided by NatTable. I wrote an article about this and it is even documented on the NatTable website.

Related

Adjust column width in Nattable - show complete column name when selected

I need to display complete column header name, when column is selected, it means increase column width. And reset width when column is deselected. I did not find example in nattable_examples.exe. Is there some built in feature?
No there is no built-in feature that would support automatic increase/decrease of column widths on selection. You will need to implement some selection listener and then do an auto-resize on the selected column by using the AutoResizeColumnsCommand.
But I don't think we have an event on deselect, so I am not sure how you want to reduce the column width again.

How to change the column width/ratio in Flexible Column Layout?

The predefined ratios of sap.f.LayoutType for two columns in Flexible Column Layout are
67/33/- TwoColumnsBeginExpanded
33/67/- TwoColumnsMidExpanded
Is there a way to change the ratio/width of the columns?
I wanted to have a 50%/50% ratio, but it seems not possible according to Documentation
Although the FlexibleColumnLayout can display 2 or 3 pages at one
time, they can never have equal width (50%/50% or 33%/33%/33%). One of
the pages is always larger (expanded) or even takes up the full width
of the control (fullscreen). This is intentional because users should
have a clear indication of what to focus their attention on at any
given moment, for example, a list of items, one particular item, one
item’s details.
Now I'm using sap.ui.layout.ResponsiveSplitter instead.

Filemaker with Html table layout

I'm designing a form layout in FileMaker, and I'm spending a ton of time just trying to get all the controls in the right spot. Is there some way of doing a table layout? I just want to say "this control is in this cell" and let the table take care of all the formatting. Instead of having to set the position on each object just right.
What I Have
A form with a bunch of fields, organized in a table manner, i.e., rows and columns.
Example:
What I Want
To not have to specify the exact position of each individual control. Every time one element moves or needs to resize, it ends up screwing up the entire row, column, or "table", and I end up needing to move every field individually accordingly.
Is there a better way to organize fields in a form like this so that I don't have to manipulate the position and width of every "cell" in a row or column individually?
I think this is made easier with the use of the Inspector in layout mode. In particular, the controls in the "Arrange & Align" section on the "Position" tab of the inspector.
For example, you can quickly select all fields on the same "row" and align them to the top and make them the same height and width as needed.
If you are using FM 13, you may also want to make use of styles to make it easier to set the same formatting quickly across similar objects.
If you're a web developer you might want to experiment using the WebViewer. You can use Javascript for creating a nice table. Then you can interact with that table through calling a script in FileMaker.
Or just stick to a portal like Michael.Hor recommended.

iPhone UI Design approach - was using Excel Filtering

I'm new to iPhone development and don't know what the best iPhone UI approach for my problem is. That's where I was hoping you all could provide some input and guidance.
Here's the system & how it's currently used:
Right now, I have an Excel spreadsheet of data with four columns - Make, Model, Size, Value. There are about 1,000 rows of data. How the system is used in Excel is to use Filtering on the columns. First, you select the Make from the filtered column (there are about 8 unique Makes), then select a Model (each Make has between 1 and 20 unique Models), then select the Size (each Model has about 20 unique Sizes), then use the associated Value.
If I were to create an HTML page and jQuery with AJAX, I'd have three SELECT elements and one DIV (or some kind of label). When a Make is selected, populate the Models SELECT. Likewise, when a Model is selected, populate the Size SELECT. Finally, when a Size is selected, display the associated Value in the DIV. (Note, that when a Make is selected, I'd need to clear out the Value DIV and the Size SELECT in addition to the population of the Model SELECT. - appropriate action for selecting Size as well)
Now, given that, what do you recommend as a UI pattern for the iPhone?
You could do exactly that you describe for the HTML version, using a UIPickerView in each place where you would use and HTML SELECT. (The UIPickerView uses the "spinning wheel" metaphor to select from a list of values).
You could also use a single multi-component UIPickerView, where the first wheel is Make, the second Model, and the third Size. That works best if the names are short enough that you can fit all three (Make/Model/Size) in a single row on the screen.

How to move all the selected element n rows down in expression blend?

Designing forms in silverlight is a PAIN.
The grid does make it easy to align stuff right or left, but when you start building more complex forms, It quickly becomes a hell.
(Think multicolumns forms, separating parts of the form in sub-usercontrol, with Localized labels so that you need the label column to be set to Auto...)
One particular problem I face is when I need to insert a new row in a form.
Is there any way to select all the
controls on multiple lines and move
them all 1 row down?
Right now, I have to go through every line and move them down, one by one.
How do you effectively build complex forms? I know about the DataForm control from the toolkit, but it is in "preview" quality and from what I have read, it is too inflexible when you need to customize and build multiple-columns forms.
Yes, complex Grid's can be annoying to change. Here are a few thoughts and ideas for you.
If you use Expression Blend and insert the Row or Column using the Blue Bars in the Artboard, Blend will attempt to do this for you. It works with varying degrees of success, largely based on the amount of the control the new row or column snap lines overlaps. For the best results, zoom into the Artboard and add the new snap line very close to the row above or column to the left.
At this point you'll still have a lot of cleanup to do, but the Grid.Row and Grid.Column properties will be correctly adjusted. Correcting the row and column sizes is one of the few times I choose to manually edit the XAML, so you'll probably be faster fixing those values manually.
If odd Margins are created (as they often are) you can select all the affected properties at once and reset the Margins en masse.
Probably the best advice would be to consider using a different control. If you find yourself constantly rearranging the contents of a Grid, perhaps you would be better off with a DockPanel. You can achieve a Grid-like result by adding elements (Grids) docked to the Top and binding the row or column height's to a Resource:
<UserControl.Resources>
<GridLength x:Key="StandardColumnHeight">32</GridLength>
</UserControl.Resources>
Now you can bind the ColumnDefinition Width to the static resource ensuring they all have the same width (of course this could also work with column widths).
<ColumnDefinition Width="{StaticResource StandardColumnHeight}"/>
If you define each of the subsequent Grid's using the same set of ColumnDefinitions (another quick XAML copy-n-paste job).
This may be a little extra work to set up initially, but inserting a new row in your DockPanel is a simple matter of XAML order and would not require as much work.