Specifying which column a button will be placed in - android-layout

I am using TableLayout, and when I am placing a button, I want to specify which column the button should be placed in. For example, column 4. The dirty way to go around this is to place 3 empty views before I place the button.
But, is there a better way? I was told to use android:layout_column="4" in the code, but it made the application crash.

The solution that I found is by using the view its basically an empty view that just takes up space in the view its placed in. Alternatively a can be used, will be able to do what I wanted to do before BUT unfortunately the columns and rows aren't distributed evenly or automatically which is a drawback.

Related

#SetViewInfo with Sorted Columns

Can someone advise whether #SetViewInfo can be used with click to sort columnns.
When a view is filtered using #SetViewInfo it removes the column sorting options, thus removing the functionality of the view. Even when resetting to all records the column sorting option is not available, however I have overcome this by opening a second view then opening the original view, messy but it works. I am using View Action Buttons. (Not sure how to store the value in a Check Box Action).
Filtering
#SetViewInfo([SetViewFilter]; "userinitials"; "$80"; 1)
Resetting.
#SetViewInfo([SetViewFilter];"";"$80";1);
#SetTargetFrame("frame");
#Command([OpenView]; "DummyView"); //Needed to get the click to sort back
#Command([OpenView]; "OriginalView")
Also if the view is already sorted on another column, ie not in a categorised state no records are found. I don't want to have to remove the sorting options on my views. The help implies you don't need to have the view categorised. But I cannot get it to work if I don't, ie if I use 0 on an uncategorised view nothing happens.
From Help
isCategory - Number. Boolean value. Required in a Standard Outline view; not for use in Calendar views. 1 indicates that the column in the columnName value is a category. 0 indicates that it is not.
Is the #SetViewInfo limited as I have found or am I missing something?
Any help appreciated.
Yes, #SetViewInfo has limitations. As far as I know, you cannot keep the sorting when you use SetViewFilter. I also believe you need to have the view categorized, at least in older versions of Notes this was the case, if I remember correctly.
Limitations like this is why I personally don't use #SetViewInfo very often (if at all), I try to use other ways to display filtered documents.
One way I have handled it in the past is to use a special form with a rich text field, and then I build a list of filtered documents (e.g. through a search) and render the list of documents in the rich text item.
I use this technique to do that: http://blog.texasswede.com/dynamic-tables-in-classic-notes/

How can I limit the display of columns on Excel?

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?

Disable sorting on one or more grid columns in Kendo UI for Angular

I'm playing around a bit with Kendo UI for Angular and can't seem to find an easy way to disable sorting on specific columns of a grid.
There's an allowUnsort in sort-settings.d.ts, but I'm uncertain on how to use this (and this appears to relate to removing sorting afterwards, not from the start).
Or perhaps I'm simply using the grid wrong, that's also possible..
My situation is as follows:
I'm trying to use a grid to display some rows, and depending on the type of data, it should render a different icon in the first column. Also, I'm not using a 'real' header in that column, but replaced it with a button to create a new row.
To get my button in the header, I use a <template kendoGridHeaderTemplate ...>...</template>. This always seems to add a link around the header cell if sortable is enabled, which is what I'm trying to avoid (in some cases).
Is there a way around this?
Setting [sortable]="true" for the Grid component will enable sorting globally. Then you can fine-tune which column has sorting by disabling it per column, i.e [sortable]="false"
Here is a quick example:
http://plnkr.co/edit/hLbzC5jKJwVdMtRmh0cH?p=preview

OpenEdge: Get clicked column in a browser

I have a browser object and I'm trying to get the number of the column in which the user clicked a cell - is that possible? My browser is called brw-misc so when I try:
brw-misc:CURRENT-COLUMN
I get '?' in return unless I've clicked on the column heading to sort the records before that.
brw-misc:COLUMN
Always returns '1'.
The CURRENT-COLUMN attribute only works with editable browsers. That's probably why you're getting a null (?). The COLUMN attribute is where the browser is positioned on the frame.
If the browser is editable, you can use
brw-misc:CURRENT-COLUMN:LABEL
to get the column label. You can then use that to figure out which column number that is.
TheDrooper offered some good advice above.
If that column is editable, and clicking it actually gets inside the field (to update the value), then you can query FOCUS:NAME to learn what is the column name you just clicked. It's a handle, all handle attributes apply.
It's going to be way trickier if you don't have the fields enabled, though. You didn't specify if this is client GUI, I'll go ahead and assume it is (rather than Webspeed). You need to capture mouse coordinates using Windows DLLs, your window coordinates (using X and Y attributes), then your browse columns X and Y, and hope that browse is not horizontally scrollable, lol.
If you do all that, you can tell which column they clicked on. Oh, and since (As far as I understood) you're more worried on which column he clicked on, rather than which cell, you're going to value X over Y (but don't forget to test to make sure they actually clicked INSIDE the browse at all).
Off the top of my mind, that's what I can think of. Not sure if it helps, but it might point you somewhere!

How to specify the width of site column in a list?

I have developed a list in SharePoint. While entering new item in it, like name, if I keep on typing it gets spread over a line making the width of cloumn spread over page. I want to limit the width of site column so as the column's value spreads over multiple lines instead of spreading over one. How can I do this setting?
This is not a setting you can configure in SharePoint. You will need to write some custom code using css and possibly javascript that will set the width of the column. You can make a change like this in SharePoint Designer.
You must use min-width (CSS) in your block.
You have to create custom XSLT for this. There you have loop all the column and need to specify the overflow:auto, hidden,.. CSS property. So it automatically get effect based on your internal name of the field.
So whereever you have the field it automatically get affected. If it for one single view you can use JavaScript to achieve this but this is not right way to do.
The data you are entering can be displayed in many ways. Today in a table format, tomorrow in a dropdown etc. You should distinguish between:
limiting the amount of data that can be entered in a site column (can be done in SharePoint alone, when you design your list)
limiting the wrapping of the words in a table cell today or trimming the values in a dropdown tomorrow (can be done using HTML/CSS "nowrap" if you display the list values in a browser app, or differently if you show the values in a WinForms app)

Resources