I am using GridNic for printing reports. I want to add a row at the bottom containing total of a column. I searched across the web but couldn't find a solution.
I tried to add an extra array index in dataset containing total of a column, but when I sort the table it no longer remains at the bottom.
Also, I'll really appreciate if somebody can share GridNic documentation with me. The documentation on GridNic site is not really helpful.
thanks in advance!!
Brute force: cannot find elegant solution
Works for me on SlickGrid:
In sort handle before call sort method clone your total row, then call sort method, then place copy back
Hope will help
Related
We are current on Oracle 11g.
I created a view (View A) which joins multiple tables. I then create a another view (View B) using PIVOT.
The requirement is to make View B writable, so I use the Trigger to do an INSTEAD OF.
The challenge is that inside of the trigger, I have to write an individual INSERT statement for each non-null pivoted column and these columns can grow. I don't want to be modify the trigger every time a column is added. Is there an elegant to way to handle this situation?
Thanks
P.S. I have made a honest effort to search the net, but come up empty, so you know or think there's a duplicate article out there, simply let us know and don't down vote the question. Appreciated very much! :)
I am displaying a datawindow in PowerBuilder (v12) but for one of the columns only wish to display information in the column if the data has changed, otherwise the user will be subjected to a lot of repeats on the screen.
Is this possible please or must it be done in the SQL I am obtaining the data from?
If you mean when it has changed from row to row, going down the list, then this sounds like the feature found in the DataWindow painter under Rows \ Suppress Repeating Values....
Good luck,
Terry.
I have to give a functionality on one of my pages is like:
I have data which represents data of a row from a table, and table has many columns.
This data has to be edited, and sent back to the server.
I am showing data in a datagrid, which obviously doesnt look good as we always have one row and that too a large row, so user has to use scroll to look for some values.
I want suggestions for this, like what should i use to make it look better and more user friendly.
I could have hard coded things but considering, if tomorrow table schema or xml respnse change it will break.
Any suggestions will be nice.
If I have clearly understood your problem, you have too much information in a row and you would like too be able to see all of your row data in the meantime.
How about creating dynamically, on a row double click by example, a form popup that would display vertically your columns data ?
I want to make a page that contains a single comment AND all the replies to it. So far, no luck: I can call comment_render on the node and desired comment ID (cf also How do I print a single comment in drupal?), but that just gives me the comment, not the replies.
Digging through the comments table makes me think that a solution would have to hack its way through the cid and pid fields that implement the thread, but I don't see how to do that in a way that can be passed through pager_query to handle the possibility of a large number of replies. Any thoughts out there? Thanks!
For future visitors: I got something working, which I think actually isn't too terrible:
1: Pull all the comments on the given node out of {comments}.
2: Walk through those comments, starting with CID: traverse the tree of replies to the original comment and put together an array of the starting CID and all the discovered replies.
3: Make a temporary table, selecting from {comments} just those whose NID is that of the starting node and whose CID is one of those found by walking the tree.
4: Hand this temporary table off to a hacked version of comment_render, which operates on the temporary table instead of {comments}.
5: Print the result.
6: Profit!
Or so it seems, anyway. It probably means tracking comment_render as new versions are released, but I'm guessing/hoping that it's pretty stable code by now.
Thoughts about the relative wisdom of this are, of course, welcome.
I'm having a bit of a time trying to get Dojo grids (1.5) to play nice. Specifically I've spent about two weeks of work trying to implement a grid that allows for our result set data to collapse into rows, where rows can be expanded. Data comes in as a full set in JSON format, using ItemFileReadStore as the store. Any subsequent sorts or pagings are handled by GETing a new json from the application, and passing in new query parameters in the url.
The nested data was only two layers deep - a top layer to always be displayed and an array of child data with identical structure as the top layer. Each node has a unique ID and a cluster ID - on a parent node the unique ID and cluster ID will match.
I was initially very excited with TreeGrid - but I couldn't see how I could format it to do what I needed - namely eliminate the 'summary row' and one extra row full of null cells (???) that I just couldnt figure out how to remove unless I focused the query to only one cluster. I studied the test examples, built many test pages myself, tried to understand the forestModel, which for what I could tell was unnecessary... I found so little documentation, and sources I found online hinted that TreeGrid might not be reliable...
So I decided I would try to implement the expandable/collapsible rows in dataGrid.
I flattened the JSON data and added another attribute to indicate being a top level node ('alwaysShow' = true). I built my grid programaticaly and applied grid.filter() to pull only those top level nodes. I modified that filter by extending the ItemFileReadStore _FetchItems "filter" method to allow for OR querying instead of AND, and also modified it to allow for keys to point to arrays - when a top level node (small +/- icon in the cell) is clicked, the cluster ID of the parent node is added to the grid.filter.allowed[] and the filter is updated, allowing nodes with that cluster_id value to be displayed.
This worked fine on my small test set of five records (although id say a little slugish...) - but now I am pulling ~900 rows back from the application, and on expanding large clusters (~80 rows) I am seeing a very long flash of blue and white on the filter updates. I've spent most of my day trying to step through in firebug to find where its happening, but the dojo logic is so spread out. Seems to be happening before the call to _Grid.js defaultUpdate.
Its so bad that I am considering trying again with TreeGrid. Im also considering just doing this by hand... Im kicking myself for spending so much time trying to get Dojo to work to begin with. I would also consider a commercial "JSON->table with collapsible row" library if anyone has any recommendations...
Any suggestions or insights? Familiarity with the flashing problem or how I could adapt TreeGrid to my needs? I'm aware this is a bit of a rant... Many thanks for any help.
-robbie
EDIT: I eventually gave up trying to get Dojo to do what I needed and coded it myself in less than a day. Not the best use of three weeks...
EDIT:
I just found a solution that works for me, I have added the following CSS:
.dojoxGridSummaryRow {
visibility: collapse
}
Basically the summaries are probably still created but they are not visible nor taken into account in the table layout. That's good for me. Hope this will solve your issue.
This won't help but just to let you know that:
"- but I couldn't see how I could format it to do what I needed - namely eliminate the 'summary row' "
is the very EXACT same thing I'm trying to achieve and did not find the solution even though this looks like a very simple feature... Will let you know if I found a solution...