Create columns at runtime in the Kendo UI Angular2 grid - kendo-ui-angular2

I am about to start using the Kendo UI Angular2 grid to display a dataset that has a dynamic schema and as a result need to build the grid columns dynamically. How do I set the grid columns at runtime (programmatically)?

To generate dynamic OR run-time column from given result, you have to do some operation on that row data (result) and have to fetch first row from the result and then get each object from that row and prepare column list.
I have already posted answer for custom kendo grid, please refer this link where all the steps are mention: https://stackoverflow.com/a/45506257/6606630
Note: Check SetColumns() function in above link answer

Related

Dash Pivot Table: How to change the value attribute directly from the dashboard?

I am trying to plot a pivot table on a dashboard using dash_pivottable. Below is the code written under under the Div for app layout for exposing the pivot table on the dashboard.
dash_pivottable.PivotTable(
id = 'pivot-table',
data=[list(covid_19_data_top_10.columns)] + covid_19_data_top_10.values.tolist(),
cols=["Month"],
colOrder= 'value_a_to_z', #value_a_to_z, value_z_to_a
rows=["Country"],
vals=["Confirmed"]
The pivot table looks as shown below on the dashboard.
The value displayed above are the count of 'Confirmed' cases for each country and month.
Now I want to change the count values to 'Deaths' or 'Recovered' cases to be displayed for each country and month. How can I do that?
I tried doing using callback and dropdown buttons but result wasn't changing dynamically.
I have also attached the dataset used.
Dataset link: https://www.kaggle.com/code/manishkc06/exploring-covid-19-data/data?select=covid_19_data.csv

How do I use a power apps form for a lookup column?

I have a SharePoint List (say "List-A") with plenty of columns, some of which are lookup columns.
These are just used to construct a choice columns, where the items in the choice drop down are the items of a column in a different List ("List-B").
I have used the function on SharePoint to integrate List-A with Power Apps Form. This creates a Power Apps form that is readily available.
For the Lookup choice columns, I have added List-B as the data source, and am using the items from the correct column as items in the choice that is linked to the lookup column. This correctly populates the drop down menu as expected.
Now when I publish this form and fill it from sharepoint (it pops up as it should hafter clicking New in the List view) I can fill the entire form and submit with no issue. However all the lookup columns remain blank, as if the form returned a null value instead of the selected.
I have both datasources set up:
The update property of the datacard connecting to the SharePoint List is equal to the Selected of the datacard containing the combobox (combobox is called DataCardValue43).
The items property of the combobox is equal to the correct column of List-B.
As an alternative solution, I have attempted to make a different column that is just one line of text. For this column, I have made a combobox once again setting the items property to the column in List-B. The intention was to return the selected value as a string. It was attempted thus:
where combobox1 once again manages to give the correct options in the drop down box but returns only Null.
To study it further, I have made a power apps flow that takes Create New Sharepoint List object as input. Here I see that the values are indeed Null
The one called "Return" is the text column that I made, and the other being the lookup column. I do notice that the Lookup column isn't called Value, but id. I don't know what to do with that information though.
I really just want to have a column in my power apps form that lets you choose and the choices are values from a column in a different List. What do I do, and why doesn't what I've already done work?
Thank you.
Please follow the steps below to solve the issue.
1: Add a Lookup column in SharePoint List.
2: Open that list in Power Apps by using the Customise Forms Option From SharePoint.
3: The Item property of Lookup field will be by default as follow:
Choices([#'CustomisingSharePointList'].LookupColumnListName)
4: There is no need to change/delete the lookup field with any custom dropdown or combo box. This is the point, where you are doing mistake by adding a custom combobox and replacing the original Lookup dropdown. If you want to change datasource, apply filter or sort the data, you can do all these thing to the same original lookup column.
e.g I have applied filter and sort functions to the existing data:
Sort(Filter(Choices([#'CustomisingSharePointList'].'LookupColumnListName'), Value in Filter(LookupColumnListDataSoure,Progress.Value = "Open").ID),Id)
5: When you will publish the list, it will work fine.
Note:
CustomisingSharePointList: List in which we have added a lookup column.
LookupColumnListName: List to which the lookup column actually belongs to.
LookupColumnListDataSoure: You need to add the original list as data source in power apps to use the above filter. This step is optional and applicable only if you apply filter like I did in step 4

Spotfire: To create Slider in Text Area

I have an date property for which I have created an document property as StartDate and EndDate, and in SQL query the same will be used to filter. In the Text Area , I am using it as Control Type: INPUT Field as this has two different values for start date and end date (as shown in fig: ), I need to merge this two date property into single Slider Control Type. I tried to use Functions using formula "First(DateProperty)". However I am not successful . Can someone help me on this?
I just found the reason for the issue as well, below are two points. i May be wrong as well:
1) To create an slider calendar, we need to create a function. This function will show the data tables which are of from different connections and In our analysis we have single connection and table for Each components .Due to this we are getting error called Cyclic Dependencies and Function is not working.
2) Next to create a simple table having only date property also causing problem as even this should be an Imported table and not linked to the external databases.

Method of Wcf display at Client side in a grid asp.net

I have a table called Movies i want to select some columns from it make a method at serverside WCF and diplay them in a grid on clientside Asp.net C#
table Movies
{ Title,Thumbnail,Genre,Rent,ID,OverDueRent}
and i want to dispaly Title,Genre,Thumbnail,Rent
first get column by column id and than get data of whole column in a array variable and than fetch your desired data of column.

Filling rows of a repeating table on opening the form

In my Infopath form I use a repeating table. On opening this form on sharepoint I would like to have some rows of the repeating table filled out using information from an other list. I use content types.
What i am working on is a Timesheet system where the user can register how many hours a week he worked on different projects.
I would like that by creation of a timesheet some predefined projects will be already inserted, meaning that the repeating table will have for example 5 rows already with 5 favourite or most used projects selected based on a separate PetProject list.
When I looked at the workflow in the list where the timesheet is being created I couldn’t find the column projectname in the dropdown so I cant give it a value. When I went to look in the Form settings of TimeSheets I saw that projectname cant be selected/edited, its in plain black whereas the other columns are blue and clickable. I thought its probably because the value of projectname is merged from the different rows in the repeating table.
Is there any way I can work around this problem and assign a value to projectname by creation of the timesheet?
Thank you so much!
I think that you will need to write some code to query the data that you are after and add the data to new rows in the repeating table.
There is a loading event that you can hook into to then query a secondary data source and then
add the row to the repeating table.
Will this run with in infopath as a thick client or will it run as a browser based form using infopath form service?

Resources