I have created sharePoint Calendar list and I want to remove the Add option which comes as default in the calendar view.
you can use css, either add it to your custom style sheet or to a CEWP
table.ms-acal-vcont tbody tr td a {display:none !important;}
Related
I am trying to build a GUI with a dropdown for multi-select in python, PyQT5 but, the display is only showing single item instead of a dropdown. Is there a way to include the options as a drop down ?
QlistWidget has the setSelectionMode: QListWidget and Multiple Selection
But the combobox does not seem to have it. And I don't remember seeing a combobox with multi selection on.
No, you can't select multiple item from a QComboBox instance. It can be used to select only one item at once. If you want to have multiple selection in your widget have to use a QListView/Widget.
Let me first be clear. I'm not asking about how I do conditional formatting in Cognos BI. If there were a simple Red/Amber/Green colour scheme, based upon value ranges then I could do that. If it were a static list of colours, which never changed, I could also do that.
What I am after is accessing a hex colour code that is stored in my database, and I want to use that colour as my table cell background colour. This is something I commonly do in SSRS reports, but cannot see a method for in Cognos BI.
Is this even possible?
You can do this via the HTML object in Cognos.
The HTML object can get its definition from one of the three main ways:
1) Hard-coded text
2) Data Item Value
3) Report Expression
Obviously the first method provides no way to dynamically set the value. I couldn't get the second one to work at all. I'm not yet sure why. However, I was able to use the third type to work to allow dynamic setting of a visual style.
For the solution we'll assume you have a data item called [Color] which pulls a string value from a database in the standard hex form that is used in CSS: #xxxxxx, e.g. #CCCCCC. For the purpose of this example we'll assume it is in query Query1. The following steps describe how to set it up.
1) Add an HTML item right above your list
2) Add another HTML item at the bottom of your list
3) In the top HTML item add a span tag with a unique id such as:
<span id="list">
4) In the bottom HTML item add a closing span tag
</span>
5) Add a third HTML item before all of the other HTML items
6) Set the 'Source Type' property of the HTML item to 'Report Expression'
7) In the Report Expression put the following code:
'<style>
#list td {
background-color: ' + [Query1].[Color] + '
}
</style>'
8) Select the Page object and set the Query property to Query1
9) Click on the Properties property. Check the Color column to give the page access to that query-sourced value.
Now you can dynamically set the column color based on a database provided value. We used the span to give us a way to isolate just the table cells we want to manipulate.
The technique isn't perfect. For instance, the header cells also get their background changed to the color in question, which may or may not be desirable. This is because Cognos doesn't use the th tag for headers but instead renders them as normal cells (td).
I know it's quite and old post but just for completeness I'll add the references to get this working in html, pdf and excel.
To get this working not only for html but also for pdf and excel use a rich text item instead of a html item.
You can use following code in a query item for instance:
<span style="display:block; background-color:' + [Query Subject].[Query Item] + '"> </span>
The query item must then contain a valid color (e.g. rgb(255,0,0)) etc. which is defined by your data source.
Dragging a rich text item in a list and changing it to data item value and selecting the query item will work.
By using the span it will work for excel too, however to make sure it follows the size of the upper object in the hierarchy (the list column or a table etc) you want the display:block style.
Instead of the space in between the > < you can use any other query item that you want to appear as text.
I have one grid and text box. I want to highlight values in grid which matches with value in text field.
For example, in firefox, if you press cntrl + F4, you will see one text box and you write a value which you want to find. Firefox hightlights string mathing with this value.
Can we do like this in extjs? How?
There is an example of exactly that here:
http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/grid/live-search-grid.html
Sandeep, the trick to the highlighting is actually in the CSS.
You can navigate to ../examples/ux/css/LiveSearchGridPanel.css to find the following code:
.x-livesearch-match {font-weight: bold; background-color: yellow; }
You can add the CSS href to your index.html, or add this code to your css
Hope this is what you were able to figure out.
I have a textarea in a td element. Currently, when the text area is resized to a width beyond the width of the td element, the entire table resizes to keep the textarea element within the td.
Is there a way to allow the textarea to resize beyond the containing td?
You can add a div with fixed size inside the td around the textarea:
http://jsfiddle.net/kvKZu/4/
(reposting comment as answer)
You can use the max-width and max-height style properties on the textarea. Take a look at:
http://jsfiddle.net/kvKZu/
You can also set them dynamically with javascript if the width and height of the containing row or column is not known in advanced.
I found that applying the style table-layout:fixed to the table fixed this problem.
There is a table that js creates dynamically.
A button triggers a function that get the tables first rows innerHTML.
And replace its with
While raplacing it takes style informations as is to the divs.
After these i add some extra styling to div with replace() too.
But that function creates and fills with . Is it about percentage width or another thing?
The sample code is spagettied too much. So i couldn't paste here.
I am using HTA (HTML Application) and vbs+javascript.
Thank you in advance
Çağlar