Disable sorting on one or more grid columns in Kendo UI for Angular - kendo-ui-angular2

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

Related

Ag-grid valueGetter does not fire when "Column" is out of view or hidden

Use: We use ag-grid like we would use excel on our client software. In it we have some custom calculations that I run with the valueGetter function. Our grid has over 50 ColumnDefs. This means that some of the columns are not in view until you scroll right or left respectively. All my functions work and I have no calculation issues.
Issue: When I edit a Value I have some columns that now need to fire the valueGetter. For the columns that are currently in view they fire and run the calcs without issues, however there are some columns that are out of view and some columns are hidden. On these specifically the grid will not run the value getter until it is in view or the hidden flag on the column has been set to false.
The main reason for this being an issue is that because the grid is so wide I have to hide and show certain columns as a "view Groups". I need to know if there is a gridOptions setting or grid Directive that I am missing? Or is there another solution where I can have the calculations for the entire runs when I edit a field.
ag-grid version 23.0.2
angular version 8
Not sure if you are using Adaptable with your AG Grid implementation but if you are then this might help:
We had this issue a while back and we solved it by moving the custom calculations out of AG Grid and into Adaptable's Calculated Columns which will evaluate whenever any relevant cell in the row updates.

Using react-sortable-hoc with react-virtualized Grid

I want to use react-sortable-hoc with react-virtualized's Grid where the rows are sortable. I cannot use the List as I have multiple columns and I cannot use it with the Table because I have too many columns and therefore need horizontal scrolling.
The issue that I am facing is that the Grid does not have a rowRenderer callback as the Table or List has (it only has cellRenderer and cellRenderer), thus I don't know what to wrap the SortableElement around.
I would appreciate any ideas or examples of this usage?
I ended up implementing this as a cellRangeRenderer - see my comment on this GitHub issue: https://github.com/clauderic/react-sortable-hoc/issues/295#issuecomment-344070823

Prevent Resizing in Dojo Data Grid in Xpages

I am creating a dojo data grid following Brad Balassaitis' excellent blog series. I want to prevent the user from resizing any columns.
I know that each column needs the attribute noresize=true, but I don't know where to put that in xpages. I have defined the width of each column using percentages, and that is working. I just don't want the users messing with the widths I have set. I am hoping to not have to programmtically define the grid if I can help it. Is there an easy way to add this attribute?

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)

Specifying which column a button will be placed in

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.

Resources