I am starting to develop web in GeneXus.
When using a simple grid, I noticed that genexus automatically aligns numeric values to the right (style being applied directly in the td tags, overriding my class customization).
How can I change this in order to show all values (and titles) aligned to the left?
Thanks
Jaime, for GeneXus X Evolution 3, you can create a new class in your theme, under GridColumn. Then, set text-align: left !important; in the "Custom CSS Properties" property, and set the newly created class as the Column Class of the numeric column you want to left align.
For GeneXus older versions, you can override the right alignment set by GeneXus in the values, but not the title. For this, you have to create a new class in your theme, under Attribute. Then, set Float=Left in the class properties, and set the newly created class as the control class (Class property) of the column you want to left align in your grid.
Related
I'm using Angular slickgrid and I want to change the cell color if the value is present in that cell.
Note: I want the color only for the cell not the whole row.
Is there any best way to iterate over all the cells and set the color or any equivalent solution?
I have a requirement to show the different cell colors depending on the data. Red color if the data is coming from the server and not changed (not dirty). If the data is edited or added new row (dirty), the cell color would be blue. I have updated the question.
function renderCellWithColor(cellNode, row, dataContext, colDef) {
if (dataContext[colDef.field] != ""){
$(cellNode).addClass("requiredClass"))
}
}
I'm using this function using enableAsyncPostRender. This does not work if I edit or add new row.
Use the option cssClass on the column definition or use a Custom Formatter returning an object following the FormatterResultObject, see Wikis Custom Formatter - FormatterResultObject - Wiki and sample - Wiki, the FormatterResultObject has the advantage of applying the CSS class to the cell container via the property addClasses and using the formatter object is the only way to get access to the cell container.
I'm trying to add the ability to upload order lines into landed cost on the bills and adjustment screen via excel or csv. I customized the screen and set AllowUpload to True. enter image description here But i don't know how to use the [PXImport]. Can you guy show me step by step.Ex: what is the BQL and where
to put it. Be specific. Thanks
First determine the name of the DataView bound to the grid. To do that you can hold Ctl-Alt and click on the header of the grid and select Customize. It will open the customization project editor in the Screen section. Click on the top most element of the tree view in the middle to select the grid. Lookup the DataMember property on the property pane on the right side, this is the name of the DataView. While in the project editor, expand the Mode section of the property pane and set AllowUpload property to True.
Now that you know the name of the DataView you need to decorate it with the PXImport attribute. Create a Graph Extension in the code section of the project editor for this screen if you haven't already. In the Graph Extension, for a new DataView that you have created you add [PXImport(typeof(PrimaryDac)] right before the DataView declaration like this:
[PXImport(typeof(APInvoice))]
public PXSelect<MyDAC> MyDataView;
For an existing DataView from the base class you can override it in the same way:
[PXImport(typeof(APInvoice))]
public PXSelect<DAC> BaseDataView;
The Primary DAC can be found in the class declaration of the base graph:
public class APInvoiceEntry : APDataEntryGraph<APInvoiceEntry, APInvoice>, PXImportAttribute.IPXPrepareItems
Reference: Enabling Upload from Excel for the Grid
I have a main NSArrayController bound to an NSTableView with each row containing an instance of MyObject. MyObject has about 30 properties, but the NSTableView only has 5 columns (to show the most important properties). When a row (or more) is selected I have another NSTableView (a detail view) which shows all the properties, one per row. The detail table has two columns, one for the property name and one for the property value.
I have this working right now but my detail NSTableView uses a data source rather than bindings. This works fine as long as I notify my detail controller (which manages the data source) of a change in the main selection so that it can reload the detail table.
While it is easy to detect a change in selection, it is harder to detect a change in one of the properties of a selected object. I see elsewhere on StackOverflow, that one way to do this is to have a dummy property and use keyPathsForValuesAffectingValueForKey. Does this work well performance-wise?
Is there some other/better way to build my detail NSTableView/NSArrayController so that each row represents one property of the selected objects on the main NSTableView/NSArrayController? I'd like to use bindings if possible.
I have a JSP page that allows user to choose a color using radio button. The available colors are in the following enum
enum Colors{RED, BLUE, GREEN};
and I'm displaying them using s:radio tag
<s:radio name="selectedColor" list="#com.example.Colors#values()" ></s:radio>
This works fine and displays the list of all colors present in enum. Now I want to internationalization this list so that the lables with each radio button should be displayed using getText() in listValue
<s:radio name="selectedColor" list="#com.example.Colors#values()" listValue="getText(XYZ)"></s:radio>
what should I write in place of XYZ to get the desired result?
I'd probably do the I18N lookup on the business side of things (outside of the view layer) and just pass in a list of value/text objects, or a map of label/value pairs (I usually just use a map to avoid having to create a transfer object).
IIRC the listValue attribute would be a property name on the list object; I don't recall if you could actually specify a method like that.
I want to set the JQGRID row bgcolor depends upon the condition? How to do it? Im using php.
Thanks in advance,
look at jqGrid Coloring an entire line in Grid based upon a cells value. You should examine current row values after data loading (inside of loadComplete for example). For the elements where you want change the background-color you should remove 'ui-widget-content' css class and then add another class which defines the color which you want.