Kendo Hierarchy: Get subdetails in kendo grid rows - kendo-grid

I have a nested (hierarchical) kendo grid and I'm performing a batch edit on it. But my problem is when I will create new record I will not be able to save the sub details only the details of the parent row.
Example:
----------------------------------
FirstName LastName
----------------------------------
Jack Mesh
----------------------------------
Subject Code
-------------------------------
English 101
Math 111
When I click save changes, only Jack Mesh will be save. The subjects which supposed to be the sub details are not saving along.
Is there a way I could manipulate this to be able to get the parent row with its sub rows?
Thank you.

Related

Complex Mail Merge (CSV to Word, CSV to PDF, or Other)

QUESTION:
How do you write an ifStatement for Word or for PDF to calculate multiple rows per matching result?
USEAGE:
What I am trying to do seems fairly straight forward and was very easy when I was able to use MS Access 15 years ago, but with Access being not a possibility anymore, I am hoping somebody has a reasonable solution.
The WHAT:
I am trying to generate Statements/Invoices from a CSV (or spreadsheet of any format) into a nice report layout. Let's say the columns look like this:
First Name | Last Name | Account | Address | Item | Description | Item Total
Jane | Smith | 123 | 111 Main St | Ice Cream | it's really cold | $100.00
This is super easy and I can do in Word within 10 minutes and make it "pretty".
BUT what if there are multiple Items per invoice?
So maybe the CSV looks like:
First Name | Last Name | Account | Address | Item | Description | Item Total
Jane | Smith | 123 | 111 Main St | Ice Cream | it's really cold | $100.00
Jane | Smith | 123 | 111 Main St | Hot Dogs | all beef, all the time | $200.00
I still want there to only be 1 invoice per person but not sure how to do an if statement in Word that would say "If there are multiple items per person, put them on a new row, then total them all together"
I would be glad to have the CSV go into a PDF fillable form if I could get the multiple rows to work - I just cannot figure that portion out.
Other options: I looked at OpenOffice "Base" but couldn't get a nice form for a very custom Report. I researched briefly on how to do something like this on AWS, but without any luck. I don't think Microsoft has anything like Access anymore
You can use Word's Catalogue/Directory Mailmerge facility for this (the terminology depends on the Word version). To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
http://www.msofficeforums.com/mail-merge/38721-microsoft-word-catalogue-directory-mailmerge-tutorial.html
or:
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.
Depending on what you're trying to achieve, the field coding for this can be complex. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. For some worked examples, see the attachments to the posts at:
http://www.msofficeforums.com/mail-merge/9180-mail-merge-duplicate-names-but-different-dollar.html#post23345
http://www.msofficeforums.com/mail-merge/11436-access-word-creating-list-multiple-records.html#post30327
Another option would be to use a DATABASE field in a normal ‘letter’ mailmerge main document and a macro to drive the process. An outline of this approach can be found at: http://answers.microsoft.com/en-us/office/forum/office_2010-word/many-to-one-email-merge-using-tables/8bce1798-fbe8-41f9-a121-1996c14dca5d
Conversely, if you're using a relational database or, Excel workbook with a separate table with just a single instance of each of the grouping criteria, a DATABASE field in a normal ‘letter’ mailmerge main document could be used without the need for a macro. An outline of this approach can be found at:
https://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_winother-mso_2010/mail-merge-to-a-word-table-on-a-single-page/4edb4654-27e0-47d2-bd5f-8642e46fa103
For a working example, see:
http://www.msofficeforums.com/mail-merge/37844-mail-merge-using-one-excel-file-multiple.html
The problem with the DATABASE field, though, is that it won't provide the totals you're after. Nevertheless, if you're going down the macro route, it wouldn't take too much more code to append a totals row to the resulting table.
Alternatively, you may want to try one of the Many-to-One Mail Merge add-ins, from:
Graham Mayor at http://www.gmayor.com/ManyToOne.htm; or
Doug Robbins at https://onedrive.live.com/?cid=5AEDCB43615E886B&id=5AEDCB43615E886B!566
PS: While I'm cognisant of StackOverflow's preference for the substance of answers to be posted here rather than linked to, the complexity in this case is far too great to deal with that way, besides which, one can't post the actual field codes or a document containing them here.

google script forms ListItem: how to set pageBreakItems for each choice?

I have a question about how to set a list of choices in a Google Forms ListItem which specifies not only the the choice value but also the goToPage() pageBreak destination according to the chosen value.
I am sorry for the length of the question: I prefer to give some background to make the issue clear. Thank you so much in advance!
The context is that of a greenhouse in which different actions have to be performed for each plant at different stages of the plant growth, such as sowing, transplanting, harvesting.
The plant name and their stage of growth are stored in a sheet, called plantProgress, which has this form:
|plantNumber | nextAction |
| ------------- ------------- |
|salad001 | harvest |
|salad002 | transplant |
|salad003 | sow |
The plantNumber is updated when a new one is created (I have a pageBreakItem for this) while the nextAction value is updated in the sheet once the previous action has been completed.
When the user opens the form, he is presented with a ListItem of the plantNumber. Each of the nextAction corresponds to a different page (i.e. pageBreakItem)
Note that I already created in the Google Forms GUI both the initial page with the ListItem and the subsequent pageBreakItems with the values of nextAction, so I access to the ListItem by its ID, e.g.
plantList = form.getItemById("999999999").asListItem()
I know how to dynamically create the list of choices values if a new plant is added: I create an array from the plantNumber column (e.g. plantChoices) and pass it to plantList:
plantList.setChoiceValues(plantChoices)
What I would need to do is to also pass the destination pageBreakItem (e.g. harvest) for each choice.
I tried to understand how to do this out by looking at the documentation for the class Choice but I couldn’t figure it out.
Ideally I would like to do something like:
plantList = form.getItemById("999999999").asListItem()
plantList.setChoices([
item.createChoice('salad001', FormApp.PageNavigationType.goToPage("harvest"))
item.createChoice('salad002', FormApp.PageNavigationType.goToPage("transplant"))
item.createChoice('salad003', FormApp.PageNavigationType.goToPage("sow"))
])
I managed to solve the issue! I just needed to get the id of each defined pageBreakItem (sow, transplant, harvest) and pass it to plantList.createChoice as a second argument. Here's an example:
plantList = form.getItemById("999999999").asListItem()
sowPage = form.getItemById("111111111").asPageBreakItem();
transplantPage = form.getItemById("222222222").asPageBreakItem();
harvestPage = form.getItemById("333333333").asPageBreakItem();
plantList.setChoices([
plantList.createChoice('salad001', harvestPage),
plantList.createChoice('salad002', transplantPage),
plantList.createChoice('salad003', sowPage)
])

SSRS Creating a Matrix for each category and page break between them

I'm trying to do 2 things:
Create a matrix that will dynamically regenerate itself for each category in my dataset (could be 2 categories, could be 10)
Create a page break between each one.
So as a visual, something along the lines of this.
CATEGORY (HEADER)
EMPLOYEE NAME (Details)
---- PAGE BREAK -----
Which would look like something this:
NEW YORK
John etc...
Jim etc...
Liz etc...
---- page break -----
VERMONT
Jack etc...
Sue etc...
Tom etc...
Phil etc...
---- page break -----
TEXAS
Brian etc...
Greg etc...
Can someone help me understand how to build a single matrix for each category (State in this example) in my dataset ?
Thank you in advance
You can add a page break between each category. Go to Category group properties in the Page Break tab, select Between each instance of a group.

Suggesting the related records

We are trying to display related results on details page in endeca.
Upon clicking on any record on category(record listing) page, we want to display record id's having same parent id of the clicked record.
Example:
Record id Parent id Property1 Property2
100 100 vcx jhk
101 100 abc def
102 100 xyz cvb
103 110 hki qer
If I perform search for record id = 101, I should get one result and if I navigate to that record, I want to display the details of record id = 101 and also I want to list the record id =100 and record id=102 as related results. Because all these three records having same parent id (i.e 100).
We are trying to implement this with the help of assembler-context.xml modification so that it will reflect in assembler API as our application is using assembler API to render the results.
I am sorry if it is a naive question as I am new to endeca :). Please help.
Regards,
Mohan.
Few options:
Make parent id as a dimension.
Use record filters (Nr).

How to do a recursive query in Linq2Sql?

I have the following table, MenuItems, in the database:
ID ParentID Name
--- --------- -----
1 0 Item 1
2 1 Item 2
3 1 Item 3
4 0 Item 4
5 3 Item 5
I want to write an extension method to get all menu items to the root of the tree. Something like this:
public IQueryable<MenuItem> GetToRoot(this IQueryable<MenuItem> source, int menuItemID)
{
return from m in source
????
????
select m;
}
If I call this extension method with the data above for the menu item with ID 3, I should get:
ID ParentID Name
--- --------- -----
1 0 Item 1
3 1 Item 3
Is this possible with Linq2Sql with only one call to the database?
I don't think you'll be able to do it in a single query, and here's my thinking: discovering an item's parent effectively requires one join of the table with itself. Each additional menu level requires one more join of the table with itself. How many joins/additional levels will you need to reach the root? You won't know until you perform each one, right? So, whether on the database/SQL side or in LINQ to SQL, you'll have to take each step one at a time.
If you know your menu system won't go beyond a certain depth, I suppose you could set up a LINQ to SQL query that joins the table with itself that number of times, but that sounds ugly.
What I would suggest is setting up an association of the table with itself in your DBML designer, that would give you a parent EntityRef<> property on the class. Since cycles are not allowed in your LoadOptions (and therefore the parent cannot be pre-loaded), you could force the lazy load of the parent in the entity's partial OnLoaded() method.
Here are some relevant SO questions:
https://stackoverflow.com/questions/1435229/hierarchy-problem-replace-recursion-with-linq-join
LINQ to SQL for self-referencing tables?
Here is a server-side/SQL treatment of the problem:
http://www.sqlteam.com/article/more-trees-hierarchies-in-sql
Here is someone who has written some helper code:
http://www.scip.be/index.php?Page=ArticlesNET18