How to set position columns Grid by alphabetic Label order in Form? - forms

how to set position columns in form dynamics ax by alphabetic Label order ?
I have a Grid in my Form, I want to set the colums position Grid , I think to set this with code x++ in Form Init method, but I don't know how to do.
Thanks for help,
enjoy!

You have to add fields manually with the addDataField method on the FormBuildGridControl.
You can see an example in \Classes\SysTableBrowser\showAllFields

Related

How to put color for the whole cell

I am trying to color code my list in tableau with red color for dates in end date lesser than today() or when concern column is Yes. I created a dual axis of 1 and 0 to get the cells with color in one column and get the text in another and created a dual axis so that they overlap. For that I created a calculated column where I gave the color red if the conditions meet.
This is in my calculated field:
Color:
IF TODAY()>[End Date] OR [Concern (Yes/No)]="Yes" then "RED"
ELSE "None"
END
However even after totally maximizing the size of the square for color for 1. The fields do not fill the whole cell. How do I fill the whole cell?
Here is the pic:
Please help me out here?
You may have 2 options here. I haven't tested so will leave you to see what works best.
Option 1 - use a measure and a Square mark type. Create a calculated field that returns a measure. We can adapt the formula you have built:
INT(TODAY()>[End Date] OR [Concern (Yes/No)]="Yes")
Put that field on Columns - aggregate to either MIN or MAX, doesn't matter - and set the Mark Type as Square. Also put this field on Colour and set your colours accordingly. Put your text on the Label shelf (or Text, I forget what it's called with the Square mark type.
Option 2 - similar to what you have now. You don't need MIN(1) and MIN(0), just one of those should suffice. Make it Gantt, the above calculated field on colours and your text field on Label. This article on the Tableau placeholder technique describes how to do this.

Essential JS 2 Grid: save/restore column order and width?

The use case is to a) allow the user to resize columns and reorder them, which the Grid can do, and then by user reset to what they had.
What I need: how do I a) read/set the column order and b) read/set the column widths? If there's a document with a description of grid column properties and methods, that's what I need. Or, if the column widths and order are stored elsewhere on the grid, the doc for that component.
thanks,
Hank
Based on your requirement, we have achieved the resetting of resize and reorder columns after we do both actions on Grid using getPersistData and setProperties methods. We have locally to store the Grid Properties using getPersistData(it is store feasible of resetting grid properties) method in load event of Grid and you can bind the locally stored grid properties to Grid using setProperties method when we reset the positions and width of the columns in the Grid. please refer to the Grid code example and sample for more information.
[Index.cshtml]
<ejs-grid id="Grid" dataSource="ViewBag.dataSource" allowReordering="true" allowResizing="true" load="onLoad">
<e-grid-columns>
. . . .
</e-grid-columns>
</ejs-grid>
<script>
function onLoad() {
window.localStorage.setItem("gridPorps", this.getPersistData()); //Store the intial renderting Grid properties in global variable
}
document.getElementById("resetprops").addEventListener("click", function () {
var grid = (document.getElementById("Grid") as any).ej2_instances[0];
grid.setProperties(JSON.parse(window.localStorage.getItem("gridPorps"))); //Bind the stored Grid properties in the Grid
});
Sample link: https://www.syncfusion.com/downloads/support/directtrac/252153/ze/filter_core-120629378.zip
Else If you expect to reset the Grid columns positions and width after reorder and resizing the Grid columns. Please share your exact requirement to us it will help validate further.
Please get back to us, if you need further assistance.
Best,
Balaji S

Matlab clustergram: add color markers by column label

I'm using clustergram in the Matlab bioinformatics toolbox. I want to add color markers to certain columns, similarly to this, but I want to mark specific ColumnLabels (IDs) rather than specific clusters.
Anyone know of a way to do that?
Found it. Based on Kevin's excellent suggestion, I passed a structure with colors for ColumnLabelsColor, then set LabelsWithMarkers as true:
clustergram(mat,'Colormap', redbluecmap,'ColumnLabelsColor',s,'LabelsWithMarkers',true)
mat is my DataMatrix. s is a structure of 2 cell arrays, each with length of the number of columns: first array is ColumnLabels, second array is my defined colors.
By default, setting ColumnLabelsColor changes the color of the text of the labels. Setting LabelsWithMarkers to true adds a color marker between the label and the clustergram:
Thank you for the suggestion. I have just figured out this problem.
First step: construct a structure with 'Labels' and 'Colors'. These two cell array should in the same length.
Second step: set the clustergram object, parameter 'ColumnLabelsColor' with this structure.
Also, set 'LabelsWithMarkers' as true.
[This is my original code for your reference ]
https://i.stack.imgur.com/ZTQ1h.png

How to properly display a grid

I need to change a crystal report. It's a simple grid with header, footer and rows inside a group.
The grid is drawned with lines and inside each square a field is added to display the data. Is this the "normal" way of doing this? I would expect just adding fields with borders would be enought without the need to draw the grid line by line.
I'm using version 14
If you are happy with the kind of display with borders to the fields then you don't need to add the lines to form a grid else if you need to be more user friendly then you can add lines.
Either of the option is just a design change but not the logic change in the report...
So the answer for this question would be up to the user requirement and design requirement of the report

How to apply color dynamically in a header text box on Tablix SSRS

I did a ssrs report using Tablix Matrix control. I am designing that matrix with one column and many rows. That once column will repeat based on the group that i had from SP at run time. It works fine. But now I want to change the background color dynamically for the header text box of the tablix. Is it possible?
I need to do dynamically. Since I dont know how many column will get at run time. It depends upon the data from Stored Procedure.
Can any one help me out this?
You can set the background color for the textbox to an expression, just like any other text box. For example, something like this:
=Iif(Fields!MyHeader.Value = "AlertColumn", "#FF0000", "#FFFFFF")
This is a bit old post. But I can say that yes we can achive alternate row/Column background color on Matrix control.
Please take a look into Matrix row/column background color thred.