Get datasource after applying filtering - infragistics

I am using igGrid, I would like to get the dataSource of the grid AFTER the filtering has been applied
I have found this link
http://www.infragistics.com/community/forums/t/79677.aspx which is helpful but doesn't answer my question.
This is the code I use to filter my grid
$grid.igGridFiltering("filter", filterExpressions, false);
Now I need to do something like this
$('#grid1').igGrid('option','dataSource') //but this gives me the dataSource before filtering!

You can get the filtered data using the following syntax:
$("#grid1").igGrid().data("igGrid").dataSource.dataView()

You can Get the filtered data when the grid have with pagination with this syntax:
$("#Grid1").igGrid().data("igGrid").dataSource.filteredData()

Related

Extract column value using REGEXEXTRACT with ARRAYFORMULA

I have a column in Google Sheets with values like 1(current), 2(current), etc. I am getting these values from google form response.
I want to extract only the integer from cell value as 1,2,3.. so on.
I am able to use SPLIT(A2, "(current)") for cells. But this does not get applied for new values from form response.
I found that ARRAYFORLMULA can be used for applying a formula to new responses from forms, but somehow it isn't working. I tried them as mentioned below, but I am not sure if I am using it correctly.
=ArrayFormula(QUERY( SPLIT(E2:E,"(current)")))
=ArrayFormula(SPLIT(E2:E,"(current)"))
Can someone help with how to achieve above answer with REGEXEXTRACT?
try like this:
=ARRAYFORMULA(IFNA(REGEXEXTRACT(E2:E, "\d+")))

Hide Chart.js bubble points based on filtering

I am using Chart.js 2.5.0 and wondered if anyone could give me some pointers on the following functionality requirement.
I have a bubble chart that for arguments sake contains tweets.
I have a list view next to the chart that display the tweets. Connected to this is the ability to filter, so it will only display tweets with specific string value the user inputs.
What I would like to do is when the user utilities the filter, it only shows the bubbles corresponding to the filtered result. I am passing the pointIndex and the datSetIndex into my table. However, I am really struggling in working out how to update the chart so it hides the bubbles that are not matching the current filter output.
Any suggestions?
This doesnt solve my entire issue as Im using Vue which seems to be causing issues with updating the chart. However if you are using plain chart.js the blow fiddle gives one way to hide specific or all points
`https://jsfiddle.net/prmw1bm2/12`
it may help someone somewhere

Changing column value in ultrawingrid

I have an ultrawingrid from Infragistics which binds itself to a dataset. What I want to do is, for one of the columns I want to apply a converter.
That means, for a column that displays abbreviations for example, I want to display full names for each.
Is there a nice way to do such this in here. I know in WPF I could use converters.
In your InitializeLayout event you should place something like this
Infragistics.Win.ValueList vlAbbrevs = new Infragistics.Win.ValueList();
vlAbbrevs.ValueListItems.Add("F", "Female");
vlAbbrevs.ValueListItems.Add("M", "Male");
vlAbbrevs.Key = "_ABBVS_";
e.Layout.Bands[0].Columns["Gender"].ValueList = vlAbbrevs;
You could use a DataFilter. The following is an overview of data filters: http://help.infragistics.com/NetAdvantage/WinForms/current/CLR2.0/?page=WinGrid_About_Data_Filters.html
The following blog post has an example:
http://blogs.infragistics.com/winforms/articles/using-an-wingrid-datafilter-to-convert-strings-to-bools-and-vice-versa-for-a-checkbox-column.aspx

Google Charts: Bar chart labels are reversed

I create dinamically a chart for a website. I have a key/value map, I sort the values descending, and then create the url:
http://chart.googleapis.com/chart?
chs=400x200&cht=bhs&chbh=a&chdlp=l&chg=25,0&chma=0,0,0,5&chtt=Chart+test&
chxr=0,0,8,1&chds=0,8&chxt=t,y&
chd=t:8,5,3&
chxl=1:|Label_8|Label_5|Label_3
The values are set by chd=t:8,5,3, and the labels are set by chxl=1:|Label_8|Label_5|Label_3. However, in the chart image the labels are reversed.
I searched the documentation, but I didn't get why it is like this. Is it because I didn't set a value correctly, or is this the desired functionality?
I could reverse the label texts in chxl from code to be displayed how I want. Is this the right way?
i haven't found any mention about it either, but just made a try with -1 and it works. So use it like:
chxl=-1:|Label_8|Label_5|Label_3

How do you get child bands in ultragrid without using related tables in a dataset?

I'm using linq to pull back an object (i.e. customer) that might have a collection of other objects(customer.orders). I would be nice if I can pass this list of customers to the ultragrid and a hierarchical view of customers and thier orders displayed on databind. When I try this, I just get customers. Anyone know how to get this to work with non dataset objects?
Figured it out. IList collection works and will create bands for properties of your domain object if it is an IList<T>. Just make sure thatDisplayLayout.ViewStyle = ViewStyle.MultiBand.
I've tried the following and it didn't work:
DisplayLayout.ViewStyle = ViewStyle.MultiBand
I read from this blog that it must be List and not IList in order to work, and it did.
We work with our own custom datasource for grid, so we first create a structure of bands and then we initialize data OnDemand, handling events
InitializeDataRow
InitializeRowsCollection
CellDataRequested
We use Tags to navigate through the structure.