I have a tree Grid where I want to provide for a Search facility and highlight the results in a tree. I looked at the link How to search for a row and then select it in jqGrid? and the same works fine.
However my Grid is a tree and as mentioned in the link Selecting multiple rows in jqGrid tree, MultiSelect:true option does not work. Hence when I search for a pattern, only the last row with the matching pattern is highlighted. I want to know how to highlight all the rows with the matching pattern.
The solution provided in the link Access jqgrid elements using a javascript suggests providing checkboxes to get a list of selected rows, but my requirement is to highlight the rows which satisfy the search result.
If this description is not sufficient, I will provide for my jqgrid definition, but I thought this is a generic issue and hence am currently not pasting the same.
Thanks much in advance
I changed the background color of the rows that match the search pattern and that served my purpose. Another link that helped me is - jQuery Highlight Effect with no fade away
If you have the id's of the rows that have matches..
You can do..
//matchingRowIds
$.each(matchingRowIds, function(rowId, _){
grid.setSelection(rowId); //or however it is that you're selecting the row
});
Note: Do not call resetSelection() whilst calling setSelection()
Related
Can someone advise whether #SetViewInfo can be used with click to sort columnns.
When a view is filtered using #SetViewInfo it removes the column sorting options, thus removing the functionality of the view. Even when resetting to all records the column sorting option is not available, however I have overcome this by opening a second view then opening the original view, messy but it works. I am using View Action Buttons. (Not sure how to store the value in a Check Box Action).
Filtering
#SetViewInfo([SetViewFilter]; "userinitials"; "$80"; 1)
Resetting.
#SetViewInfo([SetViewFilter];"";"$80";1);
#SetTargetFrame("frame");
#Command([OpenView]; "DummyView"); //Needed to get the click to sort back
#Command([OpenView]; "OriginalView")
Also if the view is already sorted on another column, ie not in a categorised state no records are found. I don't want to have to remove the sorting options on my views. The help implies you don't need to have the view categorised. But I cannot get it to work if I don't, ie if I use 0 on an uncategorised view nothing happens.
From Help
isCategory - Number. Boolean value. Required in a Standard Outline view; not for use in Calendar views. 1 indicates that the column in the columnName value is a category. 0 indicates that it is not.
Is the #SetViewInfo limited as I have found or am I missing something?
Any help appreciated.
Yes, #SetViewInfo has limitations. As far as I know, you cannot keep the sorting when you use SetViewFilter. I also believe you need to have the view categorized, at least in older versions of Notes this was the case, if I remember correctly.
Limitations like this is why I personally don't use #SetViewInfo very often (if at all), I try to use other ways to display filtered documents.
One way I have handled it in the past is to use a special form with a rich text field, and then I build a list of filtered documents (e.g. through a search) and render the list of documents in the rich text item.
I use this technique to do that: http://blog.texasswede.com/dynamic-tables-in-classic-notes/
In my website i use the seajax pivot viewer to view a large amount of images. So to not search endlessly long for the picture i need i usually use the search box in the view to filter on a specific property of my collection. Now when i press enter it works perfectly and it filters my collection. I could however be possible that multiple properties have the same value so to further filter my search i use the filters beneath the search box. This also works fine.
Now for my question: Is it possible to open such a filterbox after i press enter, so that the specific values for a certain property are shown?
I already took a look at it and i belief that i need to do it in the pivot viewer js, however i cannot find the right way to do it. I could not find anything on stackoverflow about it.
Thank you in advance.
The documentation in react-virtualized is not clear on how row selection is handled. I need to:
track selected row
highlight selected row
query which row is selected (I care for getting to its data)
It appears that there is a way to handle row click events and change style class on per row basis. I assume I have to roll my own selection tracking based on these parameters. I hope I am wrong and there is a better way.
Than you
The concept of a selected row or per-row styling is not specific to windowing. It's part of application code and should be tracked there- using React's built-in setState probably.
react-virtualized doesn't have anything built-in for this because it's orthogonal to the purpose of the library and I wouldn't want to add bloat (in terms of byte size or maintenance efforts) for features that aren't core to windowing.
I've created examples of doing similar types of things online that you might find useful to look at. For example this slide (source code here) shows click-to-select styling.
I have used React-Virtualized Table in my app, and there are library provided functions for row style and row data.
version: react-virtualized: ^9.19.1,
Link: https://github.com/bvaughn/react-virtualized/blob/master/docs/Table.md
checkout function onRowClick for picking rowdata,
and getRowStyle for giving styling to row.
When viewing a PowerPivot workbook natively all is well. However when I save it to Sharepoint and view it via a browser, I find that the option to filter data by typing in a value is no longer present. (All there is is an extremely LONG list of values which must be scrolled through and checked.) Being able to type in a value to search on is rather crucial feature when one wants to filter on a row where there may be thousands (or more) distinct values. Using a slicer or the standard filter drop-down in this case is pretty unworkable! Is there no way around this?
Finally found a co-worker who could answer this question -- it was "hidden in plain sight". Instead of selecting 'Filter...' from a column header drop-down, select 'Label Filters' (used for text values) and then 'Begins with' from the secondary pop-up menu, and then you can type in the beginning of the string you are searching for. Silly me I thought 'Label Filters' had something to do with Labels, not text values.
Hi I have a sharepoint list that I want to filter based on text in the title, I want to beable to do a "Title contains" filter rather than an exact match, so I have gone to SPD and added a text box and go button to a page that contains the list. I have connected the 2 via a parameter and filtered based on that in the web part. This all works great
BUT..... When the page is initially shown the list is blank because the filter is blank and that doesn't match any Tiotkes in the list.....
What I'd really like to be able to do is show the entire list if the parameter is blank and opnly apply the filter if there is some text in it but I cant for the life of me figure out how to achieve it.
Any help would be really appreciated.
Thanks
In This case you would have to tweak your xsltto handle a default condition and create a default value for the parameter. If you want complete solution please paste your data view webpart xslt here