I have p13n dialog box in a table, where I am displaying 2 columns coming from the backend.
Now, I want to implement condition in column 2. For example,
if(mainCondition === true)
{
display column2;
}
else
{
hide columns2;
}
The issue here is, these column names are coming from CDS view & with entity set.
I can, of course, hide them completely using the setIgnoreFromPersonalisation method, however, I don't know how can I implement condition on these field's visibility property.
Thanks.
Since the two columns are coming from the backend, you can add Filter to the model to filter out the ones to be hidden.
Related
I'm currently working on a project that uses ag-grid in Angular.
We have a table that displays some sort of data and it's possible to filter this table using some textbox floating filters above the table for every column.
Every row has a checkmark in the beginning that can be used to select this row.
The goal is to figure out a way to not filter out the rows that have been selected by the user. The rest of the rows should get filtered as normal.
Is there an easy way to implement this?
I've been looking trough the documentation and it seems like I will have to write a custom filter component, but I'm not sure where to start. Do filters even have the capability to check if a row is selected or not?
So I figured out an easy way. I created a new simple class:
export class IgnoreSelectionFilter extends TextFilter {
doesFilterPass(params: IDoesFilterPassParams): boolean {
if (params.node.isSelected()) return true;
else return super.doesFilterPass(params);
}
}
I use this class as the "filter" component for every column where this functionality is required. This new class behaves exactly like agTextColumnFilter, but first it will verify if the node is selected or not and ignore it if it's selected.
Using Backpack for Laravel version 4, is there a way to set a css class on a row in list view if a field on the model contains a particular value? I know the ability exists in the DataTables api, but can't think of a way to make it happen in BP4L. Thanks.
I have multiple records which needs to be displayed as part of a search. A single result can contain multiple records associated to it. If there are multiple records I need to display the record with (+) and when clicked it further displays the list.
I would like to know what the best way is to implement ( I have checked Custom data grid ex: http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCustomDataGrid but would like to use UI binder)
Once the user selects a record from the expanded list, how can we load that selected record?
Any pointer are appreciated..! ( Currently on GWT 2.2)
Widget list
Tree or maybe StackPanel seems like it would be useful here.
I need some help with Access 2010 forms. My form has a number of fields (from one table). One of the field is a logical field. If the user selects true, then the next field (text field) should be enabled. This is working fine - I created an after update event procedure. The problem I have is if the user accidentally selects true, and then selects a value/s for the text field (the text field looks up a query - it is a look up field and it can have more than one value - the user can select/check as many from the list and they will be stored to the text field, separated by coma).
How will I set the text field (look up field) value to blank, if the user goes back and set the logical field to false? me.textfield.value = null gives an error.
Can anyone please help me? Thank you!
Just keep in mind that in fact a multi-value column is in fact a normalized data table.
So the display looks like this:
To clear the records selected in this child table, which is your mult-value selection, you can use this code behind the above button:
Dim rstChild As DAO.Recordset
Set rstChild = Me.Recordset.Color.value
Do While rstChild.EOF = False
rstChild.Delete
rstChild.MoveNext
Loop
Me.Color.Requery
An easy way to insert a blank lookup field is to select the field in design view and click on the lookup tab in the field properties. Before the first entry in Row Source insert the following " ";
I am using Dynamic SQl in my stored Procedure. In front end I am using C#.net gridview to display the data.
I have three fields in my Table,
1) Active- Bit
2) DateMadeInactive-smallDate
3)Comments-Varchar(Max)
Depending on the condition of the active Value I have to display those three or two fields in the gridview.
If Active= true, Then I have to display active and Comments.
If Active =false, Then I have to DateMadeInactive and Comments Fields.
For Rendering the Active field I am using the following
<asp:TemplateField HeaderText="Comments" SortExpression="Comments" >
<ItemTemplate>
<%#Eval("Comments")%>
</ItemTemplate>
</asp:TemplateField>
In my stored Procedure I am checking Like this for null, if its null then I am displaying as false
set #SQLQuery = #SQLQuery+ ',isnull(Register.Active,''0'')as Active,
Could anybody tell me where do I check for the Active value or Is there any method in SQL which Checks for the True/False condition of the field.
I am not expecting complete answer, just a hint only...
Thank you.
Hari
The GridView.RowDataBound event is what you're looking for.
When handling the event check the value of the field and show or hide your controls accordingly.
Beware: You can't hide the whole column, as it affects every row, you must show or hide the controls inside the column.