Hide filter row in Agrid - ag-grid-angular

I am unable to hide floating filter row.
you would notice an empty line even though there are no filters enabled.
Demo at : https://plnkr.co/edit/6bGd5RHKuI9Th1cN
The Source of demo is same as default demo at https://www.ag-grid.com/javascript-grid-floating-filters/
with the only exception of below line added after the columnDefs variable declaration code, to hide the columns
this.columnDefs.forEach(c => (c.filter = false));
Or is it a Ag-grid issue?
Issue image:
Any thoughts?

As per documentation: Floating Filters
Floating Filters are an additional row under the column headers where the user will be able to see and optionally edit the filters associated to each column.
Floating filters depend on and coordinate with the main column filters.
Hence, when you set [floatingFilter]="true" at grid level, the additional row will be displayed. However, as you've set filter = false for every row, the row will remain empty.
If you'd like to hide the row, you'll have set the property as per this plunk: https://plnkr.co/edit/AriPNpPsWs0zuISI
this.floatingFilter = false;
<ag-grid-angular
#agGrid
...
[floatingFilter]="floatingFilter"
...
></ag-grid-angular>

Related

SSRS hiding a row group if there are no detail rows

Can someone please help me write a custom code that will check if the details of the row group = nothing? I'd like to use this as a show/hide expression such that table 0 will not display if there are no records within the group.
I can't seem to use aggregations for the row group details at the row group level.
Edit:
example 1 with a detail row
example 2 with without a detail row but the group header still displays. I'd like to hide this group completely:
OK, so it looks like you want to hide a table, not just a group within a table.
If this is not correct , please post your full report design.
You should be able to just count the rows in the dataset that the table is bound to.
So if your table is bound to `DataSet`` the 'Hidden' property would just be
=COUNTROWS("DataSet1") = 0
"DataSet1" is the name of the dataset, it is case sensitive and must be enclosed in double quotes.
The table will be hidden but the space it consumes will not be used, in other words, you will have a blank space where the table should be.
Alternatively, you can set the NoRowsMessage property to simple text message or an expression which will be displayed instead of just hiding the table.
I ended up using an IIF(IsNothing(Fields!MyField.Value), Parameters!ShowMissingGroup.Value,False) for the row group expression visibility then using a parameter to hide/show it.

Scroll to table row or list item in an Angular app

In the code snapshot below in app.component.html, I display clickable rows in a table in Lines 39 to 58. Once the user clicks a row, I display other relevant rows in a table named suraTable as shown in Lines 63 to 77. Namely, when the user clicks on a row, the function onSelectAya(aya, suraTable) in app.component.ts is called. That function loads the necessary rows and the table is displayed.
What I am stuck with is this. Suppose suraTable ends up with 100 rows. The current behaviour is that rows 1, 2, 3... are displayed of course. I need to be able to show the table at Row 50 say (information carried in the parameter aya on Line 91). How do I scroll to that position? I tried the scrollTop way but when checking the values before and after the setting of suraTable.scrollTop, the value is always 0 (0 pixels that is). Line 100 shows that when console.log(suraTable) is reached, expected output is generated in the browser, which means that I am getting hold of the element correctly to start with.
So, how do I scroll to a specific row in a table, or to an item in a list (I could convert the whole structure to a list if easier) from within the app.component.ts component? Thank you.
<mat-row id="{{task.taskId}}"
*matRowDef='let task; columns: columnsReadyTask;let i = index;'></mat-row>
if working with datasources, you will need some delay after getting element on the page with id...
setTimeout(() => {
const selectedRow = document.getElementById(taskId);
if(selectedRow) {
selectedRow.scrollIntoView({block: 'center'});
}
}, 500);
This may not work on old browsers.
If this is simply a scrolling thing, you could add specific id to your rows so you can know theyr number, and then do
var elmnt = document.getElementById("rowNumber"+rowNumber);
elmnt.scrollIntoView();
If when the scrolling is taking part your element is not rendered on DOM, try adding a callback for when that rendering is finished. If that is not possible, maybe a setTimeout can do.

Flex mx.controls.DataGrid with conditionally editable cells

I have a mx.controls.DataGrid datagrid on a page, and the requirement I have is that some cells on that datagrid be editable dependent upon some condition in the state of the system.
So far as I can tell I can set the entire datagrid to be editable via the editable property, or all values in a column via the DataGridColumn's editable property, but I don't see a way to set this on the level of an individual cell within the datagrid.
Any suggestions?
A good example you can find here (Preventing a cell from being edited). It solves your problem completely. Just change the condition in the example to your own.
This works great:
// cell at the intersection of row 1 and column 2
dg.addEventListener(ListEvent.ITEM_CLICK, cellEditable);
function cellEditable(e:ListEvent):void {
e.target.editable = (e.rowIndex == 1 && e.columnIndex === 2) ? true : false;
}

Highlighting a row once a parameter has been selected in SSRS

I have a report that has 3 parameters: RaceDate, RaceCourse, SilksColours. The SilksColours parameter is optional.
If the SilksColours parameter is selected I want to highlight the row in my report with the colour yellow, while all the other rows stay white.
Is this possible?
For each TextBox in the row you want to highlight, you need need to set the Background Color property to be expression-based and compare the parameter value to value in the row, something like:
=IIf(Fields!Colour.Value = Parameters!SilksColours.Value, "Yellow", "White")
Edit after comments:
OK, as you've noted there are two questions here.
Parameter with default
You have a requirement to have a multi-value parameter with the ability to specify no value in particular. You can't set up a multi-value to accept NULL values, so you need to add a catch all value to the DataSet. So base the parameter on values similar to the following:
Set a parameter up to use this DataSet and set the Default Value to None:
Now we have a parameter with a default, which will not highlight any rows, so users can just ignore if they want or choose values as required.
There is one minor annoyance here - the user can select None and other values as well, they aren't mutually exclusive, but it should be good enough.
Highlighting rows
Next step is to set the Background Color values for all required TextBoxes. Since multiple colours can be selected, we need to treat multi-value parameters differently from single ones, something like:
=IIf(InStr(Join(Parameters!Colour.Value, ","), Fields!Colour.Value) > 0
, "Yellow"
, "White")
So what we need to do is use the JOIN function to create a string list of selected values, then check if the row value is anywhere in that list. Put it all together to get the following:
The report will load straight away as the parameter has a default value, with no rows highlighted:
Choose one colour and the row is highlighted:
Choose multiple colours to highlight multiple rows:
Hopefully all this is what you're after!

SSRS 2008: How to repeat on new page one row of table header

I have table with 3 rows of header, and I needed repeat on new page only second row, first and third is not needed in the pages, excepts first page.
If I set the properies "RepeatOnNewPage" in the second row only, SSRS show the error: "The TablixMember must have the same value set for the RepeatOnNewPage property as those following or preceding the dynamic TablixMember"
If I set this property in the all (3) rows of header - all ok, but I need only one :)
How to repeat only second row on new page?
I am not sure why, but this seemed to work for me.
For your 3 header rows advanced properties,
(Static) KeepTogether= false, KeepWithGroup=None, RepeatOnNewPage= TRUE
(Static the one you want) KeepTogether= True, KeepWithGroup=After, RepeatOnNewPage= TRUE
(Static) KeepTogether= false, KeepWithGroup=None, RepeatOnNewPage= TRUE
When i tried this with the top and bottom rows repeat on new page False it gave me the error you described. I changed these to true just to try. I expected them to Repeat on new page but they didnt. My first page had all 3 and the rest just had the middle.
Hope this works for you!
Go at Column Groups
Click on the black arrow at the last
Select advanced mode.
Go at "Row Group"..
In row group you will get LOTS of "static", out of which just select TOP MOST
Go to properties
A. For VS: press F4
B. For report builder... View->Properties
In that select for row headers
a. Fixed Data: True
b. Keepwithgroup: After
c. Repeatonpage: True...
And for main headers
a. Fixed Data: True
b. Keepwithgroup: Before
c. Repeatonpage: True
Set property RepeatOnNewPage = True for all rows of table. Select static row from Row Groups window.
You must have to set RepeatOnNewPage property for all static rows.
If any static row is not set RepeatOnNewPage property than it dosen't work and give error.
So just to help clarify the answer based on success from working on my table. When I did the above action on the top-most static row, I got an error message. My table has three headers that are grouped and all need to be included in the repeatOnNewPage function. In order to successfully run my report, needed to repeat the step for all the static row headers.
Static (for each row): FixedData = True, Keepwithgroup = After, and RepeatOnNewPage = True
I also went into Tablix properties and checked both boxes under Row Headers for Repeat header rows on each page & Keep header visible while scrolling.
It was a very happy moment when i did not receive an error message after completing this scenario. good luck.