Our application is an RCP appliction and needs to display table of several thousands items. For this reason, we're using SWT.VIRTUAL in our TableViewer. That works pretty well except for selection.
We're having following issue :
Our TableViewer support sorting and filtering. When we use a virtual tableviewer, changing the selection does not preserve the current selected item but the row currently selected.This leads to another item being selected.
e.g: If Item 'A' present at the 5th row is selected by user and sorting is performed, then after sorting the Item at the 5th row gets selected instead of the Item 'A'.
Using a non virtual TableViewer, everything works fine.
We tried to go into debug and found out that the cache from the AbstractTableViewer.VirtualManager class seems to be up to date with the model.
Forcing the cache to be used in the AbstractTableViewer.virtualSetSelectionToWidget() can be a possible approach.
We have tried to implement a solution suggested in https://bugs.eclipse.org/bugs/show_bug.cgi?id=338696. However it didn't work.
Please suggest some pointers or alternative work around.
Thanks for the answers.
As a workaround for working with huge tables I would suggest you to take a look at the Nattable project http://www.eclipse.org/nattable/. It supports everything you need (sorting, filtering, tree structured elements, lazy loading etc.). We successfully use it in our project, where it is necessary to display hundreds of thousands elements as a tree with around 160 columns. It also has some pretty cool styling features, which can make your table more user-friendly and interactive. Hope this helps
Related
Good morning,
I am developing my Web Application using .Net Core 3.1 and Razor Pages.
In my application I need to display a large amount of data on a grid and would therefor like to rotate a standard grid 90 degrees. I would like to obtain something like the "Horizontal Scroll" of this blog post but instead of just scrolling horizontally I would likle to move the headers to the side and, as mentioned above, rotate the entire grid fields.
I can't find any API that suites my needs though. Does anyone have suggestions on something I could try? I wouldn't want to have to build the entire grid myself (with all the paging, filtering and ordering logic). I am open for alternative solutions as well!!
Thanks everyone!
This seems more like an HTML question, and does not really relate to Razor Pages. Here are a couple of examples of horizontal scrolling HTML tables:
https://mdbootstrap.com/docs/jquery/tables/scroll/#datatable-horizontal-scroll
https://datatables.net/examples/basic_init/scroll_x.html
You said you need to display a large amount of data, I think the
design you currently want is not suitable for the display of a large
amount of data.
Because if the title is on the left, then only one data can be displayed on each page, and each page needs to load the title, which will lead to great redundancy.
If you just want to display beautiful because of too many columns, I suggest you use the responsive property in jQuery datatable, which can dynamically display the number of columns according to your current page width, and collapse or display the extra columns.
You can refer to this.
I'm using Selenium Basic to collect data from a website and store this into a database. The page I'm scraping is dynamic and loads more information as you scroll. I've been able to address most of this by using the implicit/ explicit waits, etc.
I am capturing all the IDs necessary to create the click action, which opens up another javascript popup for me to collect information there. However, even though I've been able to get these new IDs when the page loads by scrolling, when the app uses that new ID to click, I'm getting an error saying the element cannot be found. This is preventing me from opening up the javascript windows for these newly loaded rows.
When I go to collect this new data, the elements don't exist even though I was able to get the IDs for them.
When I look at the DOM in the browser and page source, all of it is there, so I don't believe it's an issue of letting the browser load.
I've tried utilizing the wait methods (implicit/explicit)...I've even put in hard 60 second waits through the routine. No matter what I do, the routine bombs out after the first 10 rows because it can't find the elements to the data it found after scrolling. I've also tried this using Chrome as well.
Unfortunately, the website needs to be private, so I can't provide the full code. The issue that's happening comes here:
driver.FindElementByXPath("//*[contains(text(),'" & DBA!ParseID & "')]").Click
The error I get is "Element not found for XPath("//*[contains(text(),'ID12345"')]
ParseID is the ID found from parsing elements within the body tag. So, I am able to collect all the IDs after loading all the data, but when it goes to click using the above code, it only works for the initial 10 rows. Everything loaded after that will not work (even though they've been loaded in the Browser for quite some time).
What I should be getting is, say 20 IDs which can create 20 clicks to javascript pop-ups to get more information. However, I am getting 20 IDs but the ability to only click on the first 10, even though I've loaded the entire page.
This issue hasn't been resolved the way I initially expected, but I've accomplished what I needed through a different and more efficient way.
First, when I researched this further by removing certain IDs in my loop, I noticed that this really didn't have much to do with data updating in the DOM or browser, but rather the ID itself not being found by a (still) unknown reason. It actually seems very arbitrary why it's bombing out. The ID matches the ID in the DOM, but when the string is being moved to the XPath, it can't find it in the DOM. I'm not sure why this would occur unless the string is breaking when being passed somehow, but I'll just let that one remain mysterious until someone smarter comes along!
What I did to accomplish what I needed is loop through the actual class N times, and pull the elements I needed within the classes. Rather than use the ID above as a unique identifier, I used the count of class web elements as the identifier. This worked with 90% less code.
Thank you all!
I am creating a custom module with additional part numbers on a separate tab in the products screen. I have built the module, but am having trouble figuring out how to display the information so it matches the layout in the attached image. I have tried tree view but have not been able to get the fields on the same line. Can this only be accomplished through css or is there a table view that I am not aware of?
I also need to make sure that all of the information in row 1 stays tethered together for additional forms, etc. My plan is to make the field names for each row end with a different number (i.e. x_mfrname1,x_mfrpn1,x_mfrname2,x_mfrpn2, etc.). Can somebody please just tell me if I am on the right track. This is the initial Odoo setup for a client of mine and I don't want them to come back to me down the line and find out I forgot something. I have been scouring the internet and reading a few books but I am not completely confident.
Here is a link to a layout of what I am talking about:
MFG Part Number Tab
Thanks!
class sub_part_details(models.Model)
_name='sub.part.detail'
primary_pn=fields.Boolean('Primary P/N')
obsolete=fields.Boolean('Obsolete')
pn=fields.Char('P/N')
desc=fields.Char('Description')
upgrade=fields.Char('Upgrade')
part_detail_id=fields.Many2one('part.details')
class part_details(models.Model)
_name='part.details'
cat=fields.Char('CAT')
sub_ass=fields.Char('Subassembly')
main_ass=fields.Char('Main Assembly')
notes=fields.Text('Notes')
sub_details_ids=fields.One2Many(''sub.part.detail','part_detail_id')
It might be helpful
I may be missing something here so I apologise if this question may come across as obvious.
In a XAML WinRT app, I can have a GridView control that I can throw a collection of stuff at, and then using DataTemplates etc I can render that stuff on screen.
How can I take this a step further and have a single “master” GridView control which contains several sections which get their data from different places and exist within the app as different collections of stuff?
For example, take the built in Games app. Here we have different sections – Spotlight, Friends, Game Activity etc which are all very different from each other, have different data and are displayed in different ways but they all exist within the same GridView control.
How can this be done?
I do hope this makes sense
Kris
If I understand your requirement correctly, you want to have a group of groups, and display each of the child groups using different templates.
The way I did it was to derive all the child items from a common base class (or you could build a group of groups of Objects, I suppose). Then we used the DataTemplateSelector to pick the appropriate template for each item in the master GridView.
We had to go a step or two further than that in practice, but that's the theory behind how I achieved a similar goal.
When displaying several apps on a page, I am aware that I can use a global filter such as a release or iteration filter rather than having a release or iteration filter for each app. However, the global filter does not seem to work properly for the Iteration Summary app but it works with individual filter. I have looked at the source code for the Iteration Summary app to make it compatible with the global filter (aka time box filter). Please refer to http://developer.rallydev.com/help/Apps-Timebox-Filtered-Dashboards for more information.
Also, another concern for the custom grid app how do I make it so that I do not have to hard code the query like Iteration.Name = "IR 1" but instead use the global filter data to do the query. Thanks.
Custom grid should automatically respect the global timebox filter on the dashboard. It will AND on the timebox filter to any query entered (so there is no need to manually add it).
The Iteration Summary App should work with the global filter. Could you give more info on what the problem is?